WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 158473
[GLIB] Implement hardLinkOrCopyFile() in FileSystemGlib
https://bugs.webkit.org/show_bug.cgi?id=158473
Summary
[GLIB] Implement hardLinkOrCopyFile() in FileSystemGlib
Carlos Garcia Campos
Reported
2016-06-07 03:41:00 PDT
It was added in
r199230
to be used by IndexedDB blob support, but never implemented for GLib.
Attachments
Patch
(1.84 KB, patch)
2016-06-07 03:43 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Patch
(2.00 KB, patch)
2016-06-07 04:40 PDT
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2016-06-07 03:43:06 PDT
Created
attachment 280689
[details]
Patch
Adrian Perez
Comment 2
2016-06-07 04:15:00 PDT
Comment on
attachment 280689
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=280689&action=review
Informally reviewed. LGTM with a nit.
> Source/WebCore/platform/glib/FileSystemGlib.cpp:385 > + if (!link(sourceFilename.get(), destinationFilename.get()))
In Windows the CreateHardLink() function could be used here instead of always copying the file (though it only works in NTFS, see:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363860(v=vs.85).aspx
), so please add a TODO comment here to let developers working in Windows that they may want to add the relevant code in the future.
Carlos Garcia Campos
Comment 3
2016-06-07 04:40:55 PDT
Created
attachment 280694
[details]
Patch Add windows implementation too (copied from FileSystemWin.cpp and untested).
Michael Catanzaro
Comment 4
2016-06-07 07:13:26 PDT
Comment on
attachment 280694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=280694&action=review
> Source/WebCore/platform/glib/FileSystemGlib.cpp:394 > + return g_file_copy(sourceFile.get(), destinationFile.get(), G_FILE_COPY_NONE, nullptr, nullptr, nullptr, nullptr);
Probably should use G_FILE_COPY_OVERWRITE instead of G_FILE_COPY_NONE?
Carlos Garcia Campos
Comment 5
2016-06-07 10:47:24 PDT
(In reply to
comment #4
)
> Comment on
attachment 280694
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=280694&action=review
> > > Source/WebCore/platform/glib/FileSystemGlib.cpp:394 > > + return g_file_copy(sourceFile.get(), destinationFile.get(), G_FILE_COPY_NONE, nullptr, nullptr, nullptr, nullptr); > > Probably should use G_FILE_COPY_OVERWRITE instead of G_FILE_COPY_NONE?
I don't think so, this is a fallback for link, and link fails if destination exists. I think the posix implementation also fails if destination exists.
Carlos Garcia Campos
Comment 6
2016-06-07 23:50:33 PDT
Committed
r201796
: <
http://trac.webkit.org/changeset/201796
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug