summaryrefslogtreecommitdiffstats
path: root/depends/util/src
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-12 20:50:45 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-12 20:50:45 +0200
commitc088d3bef0e18c6cd90db15720841705d53c754d (patch)
tree93ed02b66fc12fc6f9018123427949030b5cfcb6 /depends/util/src
parent6775e3e72ba785f85c21eed97121051bbb5ab353 (diff)
downloadMultiMC-c088d3bef0e18c6cd90db15720841705d53c754d.tar
MultiMC-c088d3bef0e18c6cd90db15720841705d53c754d.tar.gz
MultiMC-c088d3bef0e18c6cd90db15720841705d53c754d.tar.lz
MultiMC-c088d3bef0e18c6cd90db15720841705d53c754d.tar.xz
MultiMC-c088d3bef0e18c6cd90db15720841705d53c754d.zip
GH-881 Include a top-level directory in exported instances
Diffstat (limited to 'depends/util/src')
-rw-r--r--depends/util/src/pathutils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/depends/util/src/pathutils.cpp b/depends/util/src/pathutils.cpp
index 63f1b9a5..a193212c 100644
--- a/depends/util/src/pathutils.cpp
+++ b/depends/util/src/pathutils.cpp
@@ -22,6 +22,10 @@
QString PathCombine(QString path1, QString path2)
{
+ if(!path1.size())
+ return path2;
+ if(!path2.size())
+ return path1;
return QDir::cleanPath(path1 + QDir::separator() + path2);
}