Title: [291922] branches/safari-613-branch
- Revision
- 291922
- Author
- [email protected]
- Date
- 2022-03-25 18:51:42 -0700 (Fri, 25 Mar 2022)
Log Message
Cherry-pick r290978. rdar://problem/89901536
Add early return for empty path in makeAllDirectories
https://bugs.webkit.org/show_bug.cgi?id=237540
rdar://89901536
Reviewed by Chris Dumez.
Source/WTF:
* wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::makeAllDirectories):
Tools:
* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WTF/ChangeLog (291921 => 291922)
--- branches/safari-613-branch/Source/WTF/ChangeLog 2022-03-26 01:51:39 UTC (rev 291921)
+++ branches/safari-613-branch/Source/WTF/ChangeLog 2022-03-26 01:51:42 UTC (rev 291922)
@@ -1,3 +1,36 @@
+2022-03-23 Alan Coon <[email protected]>
+
+ Cherry-pick r290978. rdar://problem/89901536
+
+ Add early return for empty path in makeAllDirectories
+ https://bugs.webkit.org/show_bug.cgi?id=237540
+ rdar://89901536
+
+ Reviewed by Chris Dumez.
+
+ Source/WTF:
+
+ * wtf/posix/FileSystemPOSIX.cpp:
+ (WTF::FileSystemImpl::makeAllDirectories):
+
+ Tools:
+
+ * TestWebKitAPI/Tests/WTF/FileSystem.cpp:
+ (TestWebKitAPI::TEST_F):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-08 Sihui Liu <[email protected]>
+
+ Add early return for empty path in makeAllDirectories
+ https://bugs.webkit.org/show_bug.cgi?id=237540
+ rdar://89901536
+
+ Reviewed by Chris Dumez.
+
+ * wtf/posix/FileSystemPOSIX.cpp:
+ (WTF::FileSystemImpl::makeAllDirectories):
+
2022-03-21 Alan Coon <[email protected]>
Cherry-pick r291009. rdar://problem/89952347
Modified: branches/safari-613-branch/Source/WTF/wtf/posix/FileSystemPOSIX.cpp (291921 => 291922)
--- branches/safari-613-branch/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2022-03-26 01:51:39 UTC (rev 291921)
+++ branches/safari-613-branch/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2022-03-26 01:51:42 UTC (rev 291922)
@@ -270,11 +270,14 @@
bool makeAllDirectories(const String& path)
{
auto fullPath = fileSystemRepresentation(path);
+ int length = fullPath.length();
+ if (!length)
+ return false;
+
if (!access(fullPath.data(), F_OK))
return true;
char* p = fullPath.mutableData() + 1;
- int length = fullPath.length();
if (p[length - 1] == '/')
p[length - 1] = '\0';
for (; *p; ++p) {
Modified: branches/safari-613-branch/Tools/ChangeLog (291921 => 291922)
--- branches/safari-613-branch/Tools/ChangeLog 2022-03-26 01:51:39 UTC (rev 291921)
+++ branches/safari-613-branch/Tools/ChangeLog 2022-03-26 01:51:42 UTC (rev 291922)
@@ -1,3 +1,36 @@
+2022-03-23 Alan Coon <[email protected]>
+
+ Cherry-pick r290978. rdar://problem/89901536
+
+ Add early return for empty path in makeAllDirectories
+ https://bugs.webkit.org/show_bug.cgi?id=237540
+ rdar://89901536
+
+ Reviewed by Chris Dumez.
+
+ Source/WTF:
+
+ * wtf/posix/FileSystemPOSIX.cpp:
+ (WTF::FileSystemImpl::makeAllDirectories):
+
+ Tools:
+
+ * TestWebKitAPI/Tests/WTF/FileSystem.cpp:
+ (TestWebKitAPI::TEST_F):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-08 Sihui Liu <[email protected]>
+
+ Add early return for empty path in makeAllDirectories
+ https://bugs.webkit.org/show_bug.cgi?id=237540
+ rdar://89901536
+
+ Reviewed by Chris Dumez.
+
+ * TestWebKitAPI/Tests/WTF/FileSystem.cpp:
+ (TestWebKitAPI::TEST_F):
+
2022-03-22 Alan Coon <[email protected]>
Cherry-pick r290367. rdar://problem/88567612
Modified: branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp (291921 => 291922)
--- branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp 2022-03-26 01:51:39 UTC (rev 291921)
+++ branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp 2022-03-26 01:51:42 UTC (rev 291922)
@@ -485,6 +485,7 @@
EXPECT_EQ(FileSystem::fileType(subFolderPath), FileSystem::FileType::Directory);
EXPECT_TRUE(FileSystem::deleteNonEmptyDirectory(tempEmptyFolderPath()));
EXPECT_FALSE(FileSystem::fileExists(subFolderPath));
+ EXPECT_FALSE(FileSystem::makeAllDirectories(emptyString()));
}
TEST_F(FileSystemTest, volumeFreeSpace)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes