From 454610ff5ac5d7cc4760e63ff2d96c09208148b0 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Sat, 24 Jan 2009 20:46:20 +0000 Subject: don't append '/' to path in getChildren() svn-id: r36042 --- backends/fs/psp/psp-fs.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'backends') 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) || -- cgit v1.2.3