diff options
Diffstat (limited to 'backends/fs/psp/psp-fs.cpp')
-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) || |