diff options
author | Joost Peters | 2009-01-24 20:46:20 +0000 |
---|---|---|
committer | Joost Peters | 2009-01-24 20:46:20 +0000 |
commit | 454610ff5ac5d7cc4760e63ff2d96c09208148b0 (patch) | |
tree | b8751675d712592f8ab3ed4c5760d2a46bbd8ac0 /backends/fs | |
parent | ab30f4417159a580e55030fe0ed9fc5963115ec9 (diff) | |
download | scummvm-rg350-454610ff5ac5d7cc4760e63ff2d96c09208148b0.tar.gz scummvm-rg350-454610ff5ac5d7cc4760e63ff2d96c09208148b0.tar.bz2 scummvm-rg350-454610ff5ac5d7cc4760e63ff2d96c09208148b0.zip |
don't append '/' to path in getChildren()
svn-id: r36042
Diffstat (limited to 'backends/fs')
-rw-r--r-- | backends/fs/psp/psp-fs.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp index 5c6727d878..11063f3dd2 100644 --- a/backends/fs/psp/psp-fs.cpp +++ b/backends/fs/psp/psp-fs.cpp @@ -129,12 +129,14 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool entry._isValid = true; entry._displayName = dir.d_name; - entry._path = _path; - entry._path += dir.d_name; - entry._isDirectory = dir.d_stat.st_attr & FIO_SO_IFDIR; - if (entry._isDirectory) - entry._path += "/"; + Common::String newPath(_path); + if (newPath.lastChar() != '/') + newPath += '/'; + newPath += dir.d_name; + + entry._path = newPath; + entry._isDirectory = dir.d_stat.st_attr & FIO_SO_IFDIR; // Honor the chosen mode if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) || |