Fix for windows backslashes in relative paths in playlists.

CQTexperiment
vspader 2007-05-24 03:49:43 +00:00
parent ee265d835e
commit cf39353358
1 changed files with 5 additions and 1 deletions

View File

@ -101,8 +101,12 @@
}
NSString *basePath = [[[baseFilename stringByStandardizingPath] stringByDeletingLastPathComponent] stringByAppendingString:@"/"];
NSMutableString *unixPath = [path mutableCopy];
return [NSURL fileURLWithPath:[basePath stringByAppendingString:path]];
//Only relative paths would have windows backslashes.
[unixPath replaceOccurrencesOfString:@"\\" withString:@"/" options:0 range:NSMakeRange(0, [unixPath length])];
return [NSURL fileURLWithPath:[basePath stringByAppendingString:[unixPath autorelease]]];
}