[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1376: Leave the path and filename parsing up to Qt, in case the fi (trunk/src/gui/log)



Author: edmanm
Date: 2006-10-23 00:33:28 -0400 (Mon, 23 Oct 2006)
New Revision: 1376

Modified:
   trunk/src/gui/log/logfile.cpp
Log:
Leave the path and filename parsing up to Qt, in case the filename contains
one type of path separator and QDir::separator() returns another.


Modified: trunk/src/gui/log/logfile.cpp
===================================================================
--- trunk/src/gui/log/logfile.cpp	2006-10-23 03:45:59 UTC (rev 1375)
+++ trunk/src/gui/log/logfile.cpp	2006-10-23 04:33:28 UTC (rev 1376)
@@ -49,10 +49,9 @@
 bool
 LogFile::createPathToFile(QString filename)
 {
-  QString path = filename.left(filename.lastIndexOf(QDir::separator()));
-  QDir dir(path);
+  QDir dir = QFileInfo(filename).absoluteDir();
   if (!dir.exists()) {
-    return dir.mkpath(path);  
+    return dir.mkpath(dir.absolutePath());
   }
   return true;
 }