Title: [287344] trunk/Source/WebKit
- Revision
- 287344
- Author
- [email protected]
- Date
- 2021-12-21 20:52:39 -0800 (Tue, 21 Dec 2021)
Log Message
Use fileURLWithPath instead of URLWithString in WebsiteDataStore::excludeDirectoryFromBackup
https://bugs.webkit.org/show_bug.cgi?id=234582
rdar://86787798
Reviewed by Simon Fraser.
URLWithString may return nil while fileURLWithPath does not; and fileURLWithPath adds file:// to path correctly.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::excludeDirectoryFromBackup):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (287343 => 287344)
--- trunk/Source/WebKit/ChangeLog 2021-12-22 04:18:57 UTC (rev 287343)
+++ trunk/Source/WebKit/ChangeLog 2021-12-22 04:52:39 UTC (rev 287344)
@@ -1,3 +1,16 @@
+2021-12-21 Sihui Liu <[email protected]>
+
+ Use fileURLWithPath instead of URLWithString in WebsiteDataStore::excludeDirectoryFromBackup
+ https://bugs.webkit.org/show_bug.cgi?id=234582
+ rdar://86787798
+
+ Reviewed by Simon Fraser.
+
+ URLWithString may return nil while fileURLWithPath does not; and fileURLWithPath adds file:// to path correctly.
+
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::excludeDirectoryFromBackup):
+
2021-12-21 Alex Christensen <[email protected]>
Re-enable ContextMenu API tests
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (287343 => 287344)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2021-12-22 04:18:57 UTC (rev 287343)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2021-12-22 04:52:39 UTC (rev 287344)
@@ -644,9 +644,9 @@
void WebsiteDataStore::excludeDirectoryFromBackup(const String& directory)
{
- NSURL *url = "" URLWithString:(NSString *)directory];
+ NSURL *url = "" fileURLWithPath:(NSString *)directory isDirectory:YES];
if ([[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nullptr])
- [[NSURL fileURLWithPath:(NSString *)directory isDirectory:YES] setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil];
+ [url setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil];
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes