[PC-BSD Commits] r19432 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Fri Sep 21 09:07:23 PDT 2012


Author: kenmoore
Date: 2012-09-21 16:07:23 +0000 (Fri, 21 Sep 2012)
New Revision: 19432

Modified:
   pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Fix a bug in the PCDM directory setup



Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-21 15:53:37 UTC (rev 19431)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-21 16:07:23 UTC (rev 19432)
@@ -274,12 +274,13 @@
 
 void Backend::checkLocalDirs(){
   //Check for directories first
-  QDir mainDir("/usr/local/share/PCDM");
-  if(!mainDir.exists()){ mainDir.mkdir("/usr/local/share/PCDM"); }
+  QString base = "/usr/local/share/PCDM";
+  QDir mainDir(base);
+  if(!mainDir.exists()){ mainDir.mkdir(base); }
   if(!mainDir.exists("images")){ mainDir.mkdir("images"); }
   //Check for sample files
-  if(!mainDir.exists("pcdm.conf.sample")){ QFile::copy(":samples/pcdm.conf","pcdm.conf.sample"); }
-  if(!mainDir.exists("pcdm.theme.sample")){ QFile::copy(":samples/pcdm.theme","pcdm.theme.sample"); }
+  if(!mainDir.exists("pcdm.conf.sample")){ QFile::copy(":samples/pcdm.conf",base+"/pcdm.conf.sample"); }
+  if(!mainDir.exists("pcdm.theme.sample")){ QFile::copy(":samples/pcdm.theme",base+"/pcdm.theme.sample"); }
   
 }
 



More information about the Commits mailing list