Bug 187373

Summary: Can not download torrent due to folder with question-mark in name
Product: [Applications] ktorrent Reporter: Jon Hermansen <bugs.kde.org>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: normal CC: bugs.kde.org
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of the behavior

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