summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-23 06:43:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-23 06:43:53 +0000
commita10c7f11d065a9c220073dd0a5cfd35de07dacc1 (patch)
treea98842f271d0cddc8e49ba7bb24ac594ee93673f /kdesktop
parent608d620c37af696840bed60ffa9d7d5098a8b3d4 (diff)
downloadtdebase-a10c7f11d065a9c220073dd0a5cfd35de07dacc1.tar.gz
tdebase-a10c7f11d065a9c220073dd0a5cfd35de07dacc1.zip
Fix issues with kxdglauncher
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1178447 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/kxdglauncher.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/kdesktop/kxdglauncher.cpp b/kdesktop/kxdglauncher.cpp
index da650aeee..fba2c3fbf 100644
--- a/kdesktop/kxdglauncher.cpp
+++ b/kdesktop/kxdglauncher.cpp
@@ -120,7 +120,16 @@ int main( int argc, char **argv)
}
else {
if (newDirectory.length() < 4096) {
- if (myqdir.mkdir(newDirectory, TRUE) == true) {
+ bool directoryOk = false;
+ if (myqdir.exists(newDirectory, TRUE) == false) {
+ if (myqdir.mkdir(newDirectory, TRUE) == true) {
+ directoryOk = TRUE;
+ }
+ }
+ else {
+ directoryOk = TRUE;
+ }
+ if (directoryOk == true) {
char systemcommand[8192];
sprintf(systemcommand, "xdg-user-dirs-update --set DOCUMENTS \"%s\"", newDirectory.ascii());
system(systemcommand);
@@ -149,12 +158,12 @@ int main( int argc, char **argv)
}
}
else {
- printf("XDG variable not recognized\n\r");
+ printf("[kxdglauncher] XDG variable not recognized\n\r");
return 1;
}
}
else {
- printf("Please specify the desired XDG variable name with --xdgname\n\r");
+ printf("[kxdglauncher] Please specify the desired XDG variable name with --xdgname\n\r");
return 1;
}
}