summaryrefslogtreecommitdiff
path: root/src/utils/paths.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-26 01:40:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-26 01:40:00 +0300
commitd4febba47388979b26cd4680cb8a6f20e548e399 (patch)
tree2d520db672ed39b755e668828d27f0dd9d18ed6e /src/utils/paths.cpp
parent803b6afd00b0e3574b40b866f21a0d3d01f6dc4d (diff)
downloadmv-d4febba47388979b26cd4680cb8a6f20e548e399.tar.gz
mv-d4febba47388979b26cd4680cb8a6f20e548e399.tar.bz2
mv-d4febba47388979b26cd4680cb8a6f20e548e399.tar.xz
mv-d4febba47388979b26cd4680cb8a6f20e548e399.zip
Improve string usage in other files.
Diffstat (limited to 'src/utils/paths.cpp')
-rw-r--r--src/utils/paths.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp
index f97ccafcb..f9c5cc5a8 100644
--- a/src/utils/paths.cpp
+++ b/src/utils/paths.cpp
@@ -149,9 +149,14 @@ std::string getDesktopDir()
char *xdg = getenv("XDG_CONFIG_HOME");
std::string file;
if (!xdg)
- file = std::string(PhysFs::getUserDir()) + "/.config/user-dirs.dirs";
+ {
+ file = std::string(PhysFs::getUserDir()).append(
+ "/.config/user-dirs.dirs");
+ }
else
- file = std::string(xdg) + "/user-dirs.dirs";
+ {
+ file = std::string(xdg).append("/user-dirs.dirs");
+ }
StringVect arr = ResourceManager::loadTextFileLocal(file);
FOR_EACH (StringVectCIter, it, arr)
@@ -165,13 +170,13 @@ std::string getDesktopDir()
replaceAll(str, "$HOME/", PhysFs::getUserDir());
str = getRealPath(str);
if (str.empty())
- str = std::string(PhysFs::getUserDir()) + "Desktop";
+ str = std::string(PhysFs::getUserDir()).append("Desktop");
return str;
}
}
- return std::string(PhysFs::getUserDir()) + "Desktop";
+ return std::string(PhysFs::getUserDir()).append("Desktop");
#else
- return std::string(PhysFs::getUserDir()) + "Desktop";
+ return std::string(PhysFs::getUserDir()).append("Desktop");
#endif
}