Bug 187373 - Can not download torrent due to folder with question-mark in name
Summary: Can not download torrent due to folder with question-mark in name
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-17 05:39 UTC by Jon Hermansen
Modified: 2009-03-22 17:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the behavior (89.50 KB, image/png)
2009-03-17 05:40 UTC, Jon Hermansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Hermansen 2009-03-17 05:39:35 UTC
Version:           3.2rc1 (using KDE 4.2.1)
Compiler:          MSVC KDE 4.2.1, installed KDE and KTorrent via kdewin-installer-gui
OS:                MS Windows
Installed from:    MS Windows

This torrent fails:

http://torrents.thepiratebay.org/4159851/Why__Discography.4159851.TPB.torrent


It appears that KTorrent would like to prepend the 'name' of the torrent (I assume stored somewhere within the file) as a parent directory to all of the files contained within the torrent. This makes sense, alot of torrent clients do this. However, my torrent's name has a question-mark in it, and as such this directory can not be created from the XP kernel on an NTFS partition.
Comment 1 Jon Hermansen 2009-03-17 05:40:00 UTC
Created attachment 32180 [details]
Screenshot of the behavior
Comment 2 Jon Hermansen 2009-03-17 05:42:26 UTC
Sorry, I neglected to transcribe the error message from the screenshot so more people may see this bug has already been filed... here goes.


[quote]
Cannot recreate missing files: Cannot create directory /Why? Discography/: Could not start process Unable to create io-slave: klauncher said Unknown protocol ".
.
[/quote]
Comment 3 Jon Hermansen 2009-03-17 05:52:38 UTC
I made a single change to the .torrent file, replacing the '?' with a '_' in only one place, which I assumed to be the 'title' metadata of the torrent. Making this change allowed the root torrent folder to be created.
Comment 4 Joris Guisson 2009-03-17 08:38:02 UTC
I can reproduce it, it seems that windows doesn't allow you to use the follwing characters:

< > : " / \ | ? *

We will have to find some solution for that.
Comment 5 Joris Guisson 2009-03-22 17:48:33 UTC
SVN commit 942840 by guisson:

Check for invalid characters (for windows that is) in torrent name on windows 

BUG: 187373

 M  +1 -0      ChangeLog  
 M  +6 -0      libbtcore/net/portlist.h  
 M  +19 -0     libbtcore/torrent/torrent.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942840