summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/gtk/FileSystemGtk.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
committerFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
commit1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch)
treecad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/gtk/FileSystemGtk.cpp
parentb83fc086000e27bc227580bd0e35b9d7bee1179a (diff)
parentc9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff)
downloadexternal_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
Diffstat (limited to 'WebCore/platform/gtk/FileSystemGtk.cpp')
-rw-r--r--WebCore/platform/gtk/FileSystemGtk.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index 94e06db..fcdc863 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Holger Hans Peter Freyther
+ * Copyright (C) 2007, 2009 Holger Hans Peter Freyther
* Copyright (C) 2008 Collabora, Ltd.
* Copyright (C) 2008 Apple Inc. All rights reserved.
*
@@ -22,8 +22,7 @@
#include "config.h"
#include "FileSystem.h"
-#include "guriescape.h"
-#include "NotImplemented.h"
+#include "GOwnPtr.h"
#include "PlatformString.h"
#include "CString.h"
@@ -180,6 +179,9 @@ String homeDirectoryPath()
String pathGetFileName(const String& pathName)
{
+ if (pathName.isEmpty())
+ return pathName;
+
char* tmpFilename = filenameFromString(pathName);
char* baseName = g_path_get_basename(tmpFilename);
String fileName = String::fromUTF8(baseName);
@@ -191,8 +193,10 @@ String pathGetFileName(const String& pathName)
String directoryName(const String& path)
{
- notImplemented();
- return String();
+ /* No null checking needed */
+ GOwnPtr<char> tmpFilename(filenameFromString(path));
+ GOwnPtr<char> dirname(g_path_get_dirname(tmpFilename.get()));
+ return String::fromUTF8(dirname.get());
}
Vector<String> listDirectory(const String& path, const String& filter)