Bugzilla – Bug 3589
Parsing for File:// URLs under windows fails when drive letter included.
Last modified: 2008-09-15 14:38:25 UTC
I am trying to use the XMLbrowser to access a file whose path is created from the file name and the playlistdir pref. In windows the pref uses the "\" notation in the file path which results in a bad parse. I can reproduce the problem using Podcast Browswer. When I tried to access from the web a podcast whose address is "file://C:\Program Files\SlimServer\server\Playlists\mypicks.opml" The following message was displayed on the LHS of the web page screen "There was an error loading the remote feed for : (Unable to open file 'C:')" With debugging d_files the following messages are logged from Slim::Utils::Misc::pathFromFileURL 2006-06-16 22:53:29.5388 Got from file url file://C:\Program Files\SlimServer\server\Playlists\mypicks.opml 2006-06-16 22:53:29.5391 extracted: C: from file://C:\Program Files\SlimServer\server\Playlists\mypicks.opml If the URL is changed to "file://C:/Program Files/SlimServer/server/Playlists/mypicks.opml" it works correctly. The problem is the file URL is created from the playlistdir pref which seems to use the "\" notation.
Andy: it looks like the URL isn't converted properly from backslashes to slashes
Indeed, it didn't occur to me to support illegal chars in URLs. ;) I'll put in a fix.
Does this fix the problem? http://svn.slimdevices.com/branches/BRANCH_6_3_x/server/Slim/Utils/Misc.pm?rev=8065&r1=7347&r2=8065
(In reply to comment #3) > Does this fix the problem? > > http://svn.slimdevices.com/branches/BRANCH_6_3_x/server/Slim/Utils/Misc.pm?rev=8065&r1=7347&r2=8065 > It should do - it is the same code I used to workaround the problem.
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.