diff options
author | Travis Howell | 2006-06-05 00:14:23 +0000 |
---|---|---|
committer | Travis Howell | 2006-06-05 00:14:23 +0000 |
commit | d47f3a76fb0fd23463d90f592182fb81e4098d24 (patch) | |
tree | 25a9930ba91c2ad17f6307f27d800b3888dca5a9 /backends | |
parent | d109ac2d655acc83a91d96ada8593bfd4b2abf7a (diff) | |
download | scummvm-rg350-d47f3a76fb0fd23463d90f592182fb81e4098d24.tar.gz scummvm-rg350-d47f3a76fb0fd23463d90f592182fb81e4098d24.tar.bz2 scummvm-rg350-d47f3a76fb0fd23463d90f592182fb81e4098d24.zip |
Add trailing slash to getCurrentDirectory if required. Fixes bug #1500563 - WIN32/SCUMM: Using scummvm.exe targetname not possible
svn-id: r22923
Diffstat (limited to 'backends')
-rw-r--r-- | backends/fs/windows/windows-fs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index 56e77d2dfa..d37d2501d9 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -123,6 +123,13 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c AbstractFilesystemNode *AbstractFilesystemNode::getCurrentDirectory() { char path[MAX_PATH]; GetCurrentDirectory(MAX_PATH, path); + + // Add a trailing slash, if necessary. + if (path[0] != 0) { + if (path[strlen(path) - 1] != '\\') + strcat(path, "\\"); + } + return new WindowsFilesystemNode(path); } |