diff options
author | Lars Persson | 2007-03-12 20:13:07 +0000 |
---|---|---|
committer | Lars Persson | 2007-03-12 20:13:07 +0000 |
commit | b9a54d55a6391520c6886bd44fecbd73828a9289 (patch) | |
tree | 674c2b1dd847bd5acd5043dfff1c8ff9c1ddcaf1 /backends/fs/symbian/symbian-fs.cpp | |
parent | 77855d5b4183996343c45ea1bf6424a9dbdf4c62 (diff) | |
download | scummvm-rg350-b9a54d55a6391520c6886bd44fecbd73828a9289.tar.gz scummvm-rg350-b9a54d55a6391520c6886bd44fecbd73828a9289.tar.bz2 scummvm-rg350-b9a54d55a6391520c6886bd44fecbd73828a9289.zip |
Added mapping from '/' to '\' since Symbian OS does n't support mixed mode (\ and / in the same filename).
svn-id: r26109
Diffstat (limited to 'backends/fs/symbian/symbian-fs.cpp')
-rw-r--r-- | backends/fs/symbian/symbian-fs.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp index 4752134372..dd18d8b5e5 100644 --- a/backends/fs/symbian/symbian-fs.cpp +++ b/backends/fs/symbian/symbian-fs.cpp @@ -69,6 +69,16 @@ static const char *lastPathComponent(const Common::String &str) { return cur + 1; } +static void fixFilePath(Common::String& path) { + TInt len = path.size(); + + for (TInt index = 0; index < len; index++) { + if (path[index] == '/') { + path[index] = '\\'; + } + } +} + AbstractFilesystemNode *AbstractFilesystemNode::getCurrentDirectory() { char path[MAXPATHLEN]; getcwd(path, MAXPATHLEN); @@ -99,6 +109,9 @@ SymbianFilesystemNode::SymbianFilesystemNode(const String &path) { _isPseudoRoot = false; _path = path; + + fixFilePath(_path); + _displayName = lastPathComponent(_path); TEntry fileAttribs; |