Fix pathByAppendingComponent for the Qt port.
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2007 07:40:29 +0000 (07:40 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2007 07:40:29 +0000 (07:40 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@26953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/qt/FileSystemQt.cpp

index 5537014..d31e46b 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-24  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Make the implementation of pathByAppendingComponent use QDir.
+
+        * platform/qt/FileSystemQt.cpp:
+
 2007-10-24  David Hyatt  <hyatt@apple.com>
 
         Make repainting work with transforms.
index 9fe9e4b..f1defb9 100644 (file)
@@ -59,10 +59,7 @@ bool makeAllDirectories(const String& path)
 
 String pathByAppendingComponent(const String& path, const String& component)
 {
-    if (path.endsWith("/"))
-        return path + component;
-    else
-        return path + "/" + component;
+    return QDir(path).filePath(component);
 }
 
 }