[webkit-reviews] review granted: [Bug 237540] Add early return for empty path in makeAllDirectories : [Attachment 454005] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 7 12:56:17 PST 2022


Chris Dumez <cdumez at apple.com> has granted Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 237540: Add early return for empty path in makeAllDirectories
https://bugs.webkit.org/show_bug.cgi?id=237540

Attachment 454005: Patch

https://bugs.webkit.org/attachment.cgi?id=454005&action=review




--- Comment #8 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 454005
  --> https://bugs.webkit.org/attachment.cgi?id=454005
Patch

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

>>> Source/WTF/wtf/posix/FileSystemPOSIX.cpp:280
>>> +	 if (!length)
>> 
>> Why aren't we replacing the `fullPath.isNull()` early return above with a
`fullPath.isEmpty()` instead? Is there a reason we want to do the access() call
in between?
> 
> We can replace it there; this is safety net before accessing fullPath's
content, so I added it here

Ok, then I'd prefer we do the check earlier like I suggested. r=me with that
change.


More information about the webkit-reviews mailing list