WebKit Bugzilla
Attachment 356977 Details for
Bug 192562
: [GLib] FileSystem::moveFile() should fall back to copying
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192562-20181210215607.patch (text/plain), 1.71 KB, created by
Adrian Perez
on 2018-12-10 11:56:08 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adrian Perez
Created:
2018-12-10 11:56:08 PST
Size:
1.71 KB
patch
obsolete
>Subversion Revision: 239037 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f309cd3a355bd61b65600fe4ae3d9001915d3a32..9ef43851b4e7e7c643c42b4c162da5fdae575ebb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-10 Adrian Perez de Castro <aperez@igalia.com> >+ >+ [GLib] FileSystem::moveFile() should fall back to copying >+ https://bugs.webkit.org/show_bug.cgi?id=192562 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests needed. >+ >+ * platform/glib/FileSystemGlib.cpp: >+ (WebCore::FileSystem::moveFile): Use g_file_move() instead of a plain g_rename(), which >+ provides a fall-back which does copy+delete when a direct move or rename cannot be done. >+ > 2018-12-10 Dean Jackson <dino@apple.com> > > Use text/javascript as recommended by the HTML specification >diff --git a/Source/WebCore/platform/glib/FileSystemGlib.cpp b/Source/WebCore/platform/glib/FileSystemGlib.cpp >index 8fc6864cec67adde29b312bb810eba5373b18831..b90eec66e23768c71f0a5af18cd8a98aa2fec317 100644 >--- a/Source/WebCore/platform/glib/FileSystemGlib.cpp >+++ b/Source/WebCore/platform/glib/FileSystemGlib.cpp >@@ -400,7 +400,10 @@ bool moveFile(const String& oldPath, const String& newPath) > if (!newFilename) > return false; > >- return g_rename(oldFilename.get(), newFilename.get()) != -1; >+ GRefPtr<GFile> oldFile = adoptGRef(g_file_new_for_path(oldFilename.get())); >+ GRefPtr<GFile> newFile = adoptGRef(g_file_new_for_path(newFilename.get())); >+ >+ return g_file_move(oldFile.get(), newFile.get(), G_FILE_COPY_OVERWRITE, nullptr, nullptr, nullptr, nullptr); > } > > bool hardLinkOrCopyFile(const String& source, const String& destination)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192562
: 356977