Changeset 203960 in webkit


Ignore:
Timestamp:
Jul 31, 2016 10:43:57 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Implement missing WebCore::moveFile() using GLib functions
https://bugs.webkit.org/show_bug.cgi?id=160363

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2016-07-31
Reviewed by Carlos Garcia Campos.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::moveFile): Function added.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203956 r203960  
     12016-07-31  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK] Implement missing WebCore::moveFile() using GLib functions
     4        https://bugs.webkit.org/show_bug.cgi?id=160363
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * platform/glib/FileSystemGlib.cpp:
     9        (WebCore::moveFile): Function added.
     10
    1112016-07-31  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp

    r203857 r203960  
    369369}
    370370
     371bool moveFile(const String& oldPath, const String& newPath)
     372{
     373    GUniquePtr<gchar> oldFilename = unescapedFilename(oldPath);
     374    if (!oldFilename)
     375        return false;
     376
     377    GUniquePtr<gchar> newFilename = unescapedFilename(newPath);
     378    if (!newFilename)
     379        return false;
     380
     381    return g_rename(oldFilename.get(), newFilename.get()) != -1;
     382}
     383
    371384bool unloadModule(PlatformModule module)
    372385{
Note: See TracChangeset for help on using the changeset viewer.