Jump to content

Downloading single file torrent to folder, created file with no name


saivert

Recommended Posts

I was downloading a single file torrent (torrent with only one file) and I typed in c:\downloads\ as the download folder. µTorrent didn't show a warning that this is not a good idea and happily created a file with no filename (except .!ut extension). Well stupid me thought oh but then I just delete the torrent and redownload it and save it with a proper filename so I right clicked the torrent and selected "Delete .torrent + data". And µTorrent not only wiped the single file but also my entire download folder in the process and it's no in the recycle bin either.

Not so sure my signature is true anymore...

Link to comment
Share on other sites

I do agree that this shouldn't be allowed to happen, but I'm not really sure how anyone could hate µTorrent for their own mistake either.

At any rate, I've notified a dev of the bug, and he's added it to his todo list. Thanks for the report!

Link to comment
Share on other sites

Eh, µTorrent most likely just calls a Windows API for file deletion with whatever you used as the Save As path for the file as one of the parameters (and rightfully so, because there's little reason for it to suspect that it would need to do any differently). I would definitely expect it to happen if I made that mistake (no matter how much I'd hate it), but maybe that's just me.

Link to comment
Share on other sites

I will never just type a folder name next time I'm downloading a single-file torrent. I will make sure it has an actual filename.

This was a stupid thing indeed. But I hope µTorrent can show a warning box in the future so nobody else will do the same mistake.

Also why does µTorrent treat single-file torrents any differently than a torrent with many files? Why can't it just ask for a download folder (not just filename to save as). If I need to rename the file I can do that myself later. It's not like I'm given the chance to rename all the files in a multi-file torrent.

...Just a question.

Link to comment
Share on other sites

More than a warning box, ideally, it should just show an error box and not proceed unless the user provides a valid filename at the end of the Save As string for single-file torrents.

Multi-file torrents are directories of files, and you're telling µTorrent where the directory should go. Single-file torrents are... single-files, and you're telling µTorrent where the single file should go.

Link to comment
Share on other sites

I haven't been able to duplicate this. I have followed the steps described:

Load a single file torrent

Set its path to c:\downloads (an existing directory with other files in it)

Delete the torrent + data

First, it seems that uTorrent will automatically append the file's name if you choose a directory. (I was never able to get the empty path .!ut the original poster described). After deleting, uTorrent properly removed the file without removing the other files in the directory.

If anyone can duplicate this and provide more detailed repro steps, please respond on this thread.

Link to comment
Share on other sites

Perhaps it would have been better if I actually tried testing before I forwarded it to you (it simply sounded like a plausible bug, so it bypassed my "filter"). Apologies for that.

Indeed, I just attempted (but haven't been able) to replicate the bug. As you mentioned, I haven't been able to actually add a single-file torrent with a blank file name -- not under normal conditions anyway. Under normal conditions, if you give µTorrent a valid, existing directory for a single-file torrent, µTorrent is already smart enough to identify the fact that you've given it a directory path, and it appends the single-file torrent's name to it instead.

I didn't feel like that gave us the whole picture, though, so I tried to replicate the reported bug from a theoretical "what if it really somehow magically happened" standpoint, and still failed. What I mean by that is...

[ol][li]I coerced µTorrent into accepting a blank file name by giving it a non-existent Save As directory, specifically with the path ending with a backslash (so something like "C:\asdf\fdsa\" or whatever). That ensures that its logic for detecting existing directories doesn't work.

[/li][li]After I managed to get the torrent added with a blank filename, I went on to actually create the non-existent but referenced folder, and created a file called ".!ut" in that directory. I placed additional files in that directory, just to see what happened when I tried removing the torrent from µTorrent.

[/li][li]I tried to remove torrent and files. The result? Only the ".!ut" file was removed. The rest of the entire directory (which I had to create after giving µTorent the originally non-existent path, mind you) remained intact, junk files and all.

[/li][/ol]

In short, I cannot see any way at all to replicate the problem.

If there's one takeaway from this little experiment, though, it would be from step 1 in my experiment. Specifically, if µTorrent encounters a Save As path that is non-existent, but clearly a directory (ending with a backslash, assuming any invalid NTFS filename trailing characters, like spaces, are stripped -- while perhaps taking the special "." and ".." directory references into account), it should treat that path as an "existing" directory, and should append the internal filename to the path (it will be creating the path anyway if it doesn't exist). Blank filenames should not be allowed, ever.

@saivert: Ball's in your court. Got any way to reliably reproduce this problem?

Link to comment
Share on other sites

  • 2 weeks later...

I have not been able to reproduce it myself after this glitch.

Things I forgot to mention:

* The torrent name was blank in the listbox in µTorrent.

* I'm running Windows 7 RC (maybe it has some glitches, who knows?)

* The folder was actually C:\Users\saivert\downloads and it contained a desktop.ini file with some Shell specific stuff (to give it a custom icon among other things).

Link to comment
Share on other sites

  • 1 year later...

Registered just to report this..

Windows 7x64, uTorrent 2.0.4

Exactly the same problem, I've been able to start downloading torrent without a name.

I manually entered path to a dir I want the torrent saved to, then hit OK. The torrent contained a single file (latest eclipse ide, to be exact). In a few seconds uTorrent displayed error, something about it cannot write to disk.

The worst part:

I was saving this torrent into Z:\archive\ dir.

Then I pressed 'Remove .torrent + data'.

My whole archive of apps and stuff (400gb+) has been deleted, and I noticed that only on the next day.. Some stuff was overwritten, later I recovered about 80% of deleted data.

Lastly, Im unable to reproduce that bug again.

Link to comment
Share on other sites

Ok, found a way to reproduce the bug:

1. get any single file torrent (I used this one: http://build.eclipse.org/technology/phoenix/torrents/java/eclipse-java-helios-SR1-win32-x86_64.zip.torrent )

2. run it with utorrent

3. save it in a folder that does not exist yet (e.g. Z:\Archive\eclipse\ )

i.e. there is already 'Archive' folder in drive Z:, I want utorrent to create new folder 'eclipse' inside and dl torrent into it;

— trailing slash required;

4. press ok -- youll see 'name' field is empty - error notification will follow (screenshot: http://yfrog.com/58torrentbugp )

5. (optional) right-click - remove and delete torrent + data (at your own risk :) ,this may delete all contents of the parent folder )

Link to comment
Share on other sites

I tried, there are funny things with empty files! :D

I tested your workaround but there is a condition you forgot to add: the user needs to disable the option 'append .!ut to incomplete files' in µTorrent before testing.

1/ Test with the option enabled:

µT creates the folder 'Z:\Archive\eclipse\' and a .torrent working copy called 'Torrents.torrent' in %appdata%\utorrent (but not in the .storrent storage folder I set in Preferences > Directories).

The torrent name and filename are empty (capture: http://img839.imageshack.us/img839/6216/nofile.png) but µT is able to download the torrent without error message.

Anyway µT fails to remove the extension .!ut when the torrent is complete. I guess it's normal because '.' is reserved to the current directory.

If I delete the . torrent & data, µT deletes the file '.!ut' and the .torrent file 'Torrents.torrent' but not the contents of the folder 'Z:\Archive\eclipse\' or 'Z:\Archive\'.

2/ Test with the option disabled:

µT creates the folder 'Z:\Archive\eclipse\' and a .torrent working copy called 'Torrents.torrent' in %appdata%\utorrent (but not in the .storrent storage folder I set in Preferences > Directories).

µT begins to download the first pieces but when it's trying to write the 1st complete piece, I receive the same error 'The System Cannot Find the File Specified' (Windows error) like you.

But if I delete the . torrent & data, µT doesn't delete the folder 'Z:\Archive\eclipse\' or 'Z:\Archive\'.

We are in the same case when you download a torrent, you stop it, you delete manually the files then you remove the .torrent + data, µT doesn't delete the other files in the same directory.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...