Bug 176143 - getFileMetadata() does not work as expected for symbolic links
Summary: getFileMetadata() does not work as expected for symbolic links
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 175976
  Show dependency treegraph
 
Reported: 2017-08-30 20:36 PDT by Chris Dumez
Modified: 2017-09-27 13:02 PDT (History)
9 users (show)

See Also:


Attachments
Patch (19.73 KB, patch)
2017-08-30 22:12 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.47 KB, patch)
2017-08-30 22:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.64 KB, patch)
2017-08-31 09:08 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (21.43 KB, patch)
2017-08-31 09:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (21.51 KB, patch)
2017-08-31 11:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.78 KB, patch)
2017-08-31 13:02 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (21.62 KB, patch)
2017-08-31 13:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-08-30 20:36:10 PDT
getFileMetadata() does not work as expected for symbolic links. It should provide metadata about the symlink, not its target. FileMetadata.type should properly be set to TypeSymbolicLink.
Comment 1 Chris Dumez 2017-08-30 22:12:19 PDT
Created attachment 319451 [details]
Patch
Comment 2 Chris Dumez 2017-08-30 22:28:52 PDT
Created attachment 319453 [details]
Patch
Comment 3 Chris Dumez 2017-08-31 09:08:22 PDT
Created attachment 319466 [details]
Patch
Comment 4 Chris Dumez 2017-08-31 09:54:59 PDT
Created attachment 319468 [details]
Patch
Comment 5 Chris Dumez 2017-08-31 11:05:54 PDT
Created attachment 319481 [details]
Patch
Comment 6 Andreas Kling 2017-08-31 12:54:47 PDT
Comment on attachment 319481 [details]
Patch

r=me
Comment 7 Andreas Kling 2017-08-31 12:55:37 PDT
Comment on attachment 319481 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319481&action=review

> Tools/TestWebKitAPI/Tests/WebCore/FileSystem.cpp:126
> +    EXPECT_TRUE(createSymbolicLink(tempFilePath(), symlinkPath));

We should probably take care to remove this symlink at some point.
Comment 8 Chris Dumez 2017-08-31 13:02:01 PDT
Created attachment 319506 [details]
Patch
Comment 9 Chris Dumez 2017-08-31 13:09:07 PDT
Created attachment 319507 [details]
Patch
Comment 10 Chris Dumez 2017-08-31 13:53:42 PDT
Comment on attachment 319507 [details]
Patch

Clearing flags on attachment: 319507

Committed r221441: <http://trac.webkit.org/changeset/221441>
Comment 11 Chris Dumez 2017-08-31 13:53:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2017-09-27 13:02:00 PDT
<rdar://problem/34694512>