Title: [203960] trunk/Source/WebCore
- Revision
- 203960
- Author
- [email protected]
- Date
- 2016-07-31 22:43:57 -0700 (Sun, 31 Jul 2016)
Log Message
[GTK] Implement missing WebCore::moveFile() using GLib functions
https://bugs.webkit.org/show_bug.cgi?id=160363
Patch by Adrian Perez de Castro <[email protected]> on 2016-07-31
Reviewed by Carlos Garcia Campos.
* platform/glib/FileSystemGlib.cpp:
(WebCore::moveFile): Function added.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (203959 => 203960)
--- trunk/Source/WebCore/ChangeLog 2016-08-01 02:13:40 UTC (rev 203959)
+++ trunk/Source/WebCore/ChangeLog 2016-08-01 05:43:57 UTC (rev 203960)
@@ -1,3 +1,13 @@
+2016-07-31 Adrian Perez de Castro <[email protected]>
+
+ [GTK] Implement missing WebCore::moveFile() using GLib functions
+ https://bugs.webkit.org/show_bug.cgi?id=160363
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/glib/FileSystemGlib.cpp:
+ (WebCore::moveFile): Function added.
+
2016-07-31 Chris Dumez <[email protected]>
Drop [StrictTypeChecking] in cases where it is a no-op
Modified: trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp (203959 => 203960)
--- trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp 2016-08-01 02:13:40 UTC (rev 203959)
+++ trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp 2016-08-01 05:43:57 UTC (rev 203960)
@@ -368,6 +368,19 @@
return -1;
}
+bool moveFile(const String& oldPath, const String& newPath)
+{
+ GUniquePtr<gchar> oldFilename = unescapedFilename(oldPath);
+ if (!oldFilename)
+ return false;
+
+ GUniquePtr<gchar> newFilename = unescapedFilename(newPath);
+ if (!newFilename)
+ return false;
+
+ return g_rename(oldFilename.get(), newFilename.get()) != -1;
+}
+
bool unloadModule(PlatformModule module)
{
#if OS(WINDOWS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes