Changeset 277449 in webkit
- Timestamp:
- May 13, 2021, 1:47:38 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 31 edited
-
Source/JavaScriptCore/API/JSScript.mm (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/FileSystem.cpp (modified) (2 diffs)
-
Source/WTF/wtf/FileSystem.h (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp (modified) (1 diff)
-
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm (modified) (1 diff)
-
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (modified) (1 diff)
-
Source/WebCore/platform/network/curl/CookieJarDB.cpp (modified) (1 diff)
-
Source/WebCore/platform/sql/SQLiteFileSystem.cpp (modified) (1 diff)
-
Source/WebCore/platform/win/SearchPopupMenuDB.cpp (modified) (1 diff)
-
Source/WebCore/workers/service/server/SWScriptStorage.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp (modified) (1 diff)
-
Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/API/glib/IconDatabase.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (modified) (1 diff)
-
Source/WebKitLegacy/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/Storage/StorageTracker.cpp (modified) (1 diff)
-
Source/WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/DumpRenderTree/win/DumpRenderTree.cpp (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp (modified) (2 diffs)
-
Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSScript.mm
r277448 r277449 85 85 } 86 86 87 String directory = FileSystem:: directoryName(systemPath);87 String directory = FileSystem::parentPath(systemPath); 88 88 if (directory.isNull()) { 89 89 createError([NSString stringWithFormat:@"Cache path `%@` does not contain in a valid directory", static_cast<NSString *>(systemPath)], error); -
trunk/Source/JavaScriptCore/ChangeLog
r277448 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * API/JSScript.mm: 12 (validateBytecodeCachePath): 13 1 14 2021-05-13 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WTF/ChangeLog
r277448 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * wtf/FileSystem.cpp: 12 (WTF::FileSystemImpl::readOrMakeSalt): 13 (WTF::FileSystemImpl::parentPath): 14 (WTF::FileSystemImpl::directoryName): Deleted. 15 * wtf/FileSystem.h: 16 1 17 2021-05-13 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WTF/wtf/FileSystem.cpp
r277448 r277449 519 519 520 520 Salt salt = makeSalt(); 521 FileSystem::makeAllDirectories(FileSystem:: directoryName(path));521 FileSystem::makeAllDirectories(FileSystem::parentPath(path)); 522 522 auto file = FileSystem::openFile(path, FileSystem::FileOpenMode::Write, FileSystem::FileAccessPermission::User); 523 523 if (!FileSystem::isHandleValid(file)) … … 745 745 } 746 746 747 String directoryName(const String& path)747 String parentPath(const String& path) 748 748 { 749 749 return fromStdFileSystemPath(toStdFileSystemPath(path).parent_path()); -
trunk/Source/WTF/wtf/FileSystem.h
r277448 r277449 126 126 WTF_EXPORT_PRIVATE String homeDirectoryPath(); 127 127 WTF_EXPORT_PRIVATE String pathGetFileName(const String&); 128 WTF_EXPORT_PRIVATE String directoryName(const String&);128 WTF_EXPORT_PRIVATE String parentPath(const String&); 129 129 WTF_EXPORT_PRIVATE bool getVolumeFreeSpace(const String&, uint64_t&); 130 130 WTF_EXPORT_PRIVATE Optional<int32_t> getFileDeviceId(const CString&); -
trunk/Source/WebCore/ChangeLog
r277448 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * Modules/entriesapi/DOMFileSystem.cpp: 12 (WebCore::DOMFileSystem::DOMFileSystem): 13 * loader/appcache/ApplicationCacheStorage.cpp: 14 (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): 15 (WebCore::ApplicationCacheStorage::checkForDeletedResources): 16 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: 17 (WebCore::CDMSessionAVContentKeySession::contentKeySession): 18 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 19 (WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles): 20 * platform/network/curl/CookieJarDB.cpp: 21 (WebCore::CookieJarDB::openDatabase): 22 * platform/sql/SQLiteFileSystem.cpp: 23 (WebCore::SQLiteFileSystem::ensureDatabaseFileExists): 24 * platform/win/SearchPopupMenuDB.cpp: 25 (WebCore::SearchPopupMenuDB::openDatabase): 26 * workers/service/server/SWScriptStorage.cpp: 27 (WebCore::SWScriptStorage::store): 28 1 29 2021-05-13 Chris Dumez <cdumez@apple.com> 2 30 -
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
r277448 r277449 147 147 : m_name(createCanonicalUUIDString()) 148 148 , m_file(WTFMove(file)) 149 , m_rootPath(FileSystem:: directoryName(m_file->path()))149 , m_rootPath(FileSystem::parentPath(m_file->path())) 150 150 , m_workQueue(WorkQueue::create("DOMFileSystem work queue")) 151 151 { -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
r274022 r277449 1292 1292 1293 1293 fullPath = FileSystem::pathByAppendingComponent(directory, path); 1294 } while (FileSystem:: directoryName(fullPath) != directory || FileSystem::fileExists(fullPath));1294 } while (FileSystem::parentPath(fullPath) != directory || FileSystem::fileExists(fullPath)); 1295 1295 1296 1296 FileSystem::PlatformFileHandle handle = FileSystem::openFile(fullPath, FileSystem::FileOpenMode::Write); … … 1432 1432 // Don't exit the flatFileDirectory! This should only happen if the "path" entry contains a directory 1433 1433 // component, but protect against it regardless. 1434 if (FileSystem:: directoryName(fullPath) != flatFileDirectory)1434 if (FileSystem::parentPath(fullPath) != flatFileDirectory) 1435 1435 continue; 1436 1436 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
r264685 r277449 380 380 m_contentKeySession = [PAL::getAVContentKeySessionClass() contentKeySessionWithKeySystem:AVContentKeySystemFairPlayStreaming]; 381 381 } else { 382 String storageDirectory = FileSystem:: directoryName(storagePath);382 String storageDirectory = FileSystem::parentPath(storagePath); 383 383 384 384 if (!FileSystem::fileExists(storageDirectory)) { -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r277357 r277449 2209 2209 return; 2210 2210 2211 auto templateDirectory = FileSystem:: directoryName(downloadFilePrefixPath);2211 auto templateDirectory = FileSystem::parentPath(downloadFilePrefixPath); 2212 2212 auto templatePrefix = FileSystem::pathGetFileName(downloadFilePrefixPath); 2213 2213 for (auto& fileName : FileSystem::listDirectory(templateDirectory)) { -
trunk/Source/WebCore/platform/network/curl/CookieJarDB.cpp
r276211 r277449 140 140 141 141 if (!existsDatabaseFile) { 142 if (!FileSystem::makeAllDirectories(FileSystem:: directoryName(m_databasePath)))142 if (!FileSystem::makeAllDirectories(FileSystem::parentPath(m_databasePath))) 143 143 LOG_ERROR("Unable to create the Cookie Database path %s", m_databasePath.utf8().data()); 144 144 -
trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
r243270 r277449 66 66 67 67 if (checkPathOnly) { 68 String dir = FileSystem:: directoryName(fileName);68 String dir = FileSystem::parentPath(fileName); 69 69 return ensureDatabaseDirectoryExists(dir); 70 70 } -
trunk/Source/WebCore/platform/win/SearchPopupMenuDB.cpp
r248846 r277449 189 189 190 190 if (!existsDatabaseFile) { 191 if (!FileSystem::makeAllDirectories(FileSystem:: directoryName(m_databaseFilename)))191 if (!FileSystem::makeAllDirectories(FileSystem::parentPath(m_databaseFilename))) 192 192 LOG_ERROR("Failed to create the search autosave database path %s", m_databaseFilename.utf8().data()); 193 193 -
trunk/Source/WebCore/workers/service/server/SWScriptStorage.cpp
r275443 r277449 85 85 86 86 auto scriptPath = this->scriptPath(registrationKey, scriptURL); 87 FileSystem::makeAllDirectories(FileSystem:: directoryName(scriptPath));87 FileSystem::makeAllDirectories(FileSystem::parentPath(scriptPath)); 88 88 89 89 auto iterateOverBufferAndWriteData = [&](const Function<bool(const uint8_t*, size_t)>& writeData) { -
trunk/Source/WebKit/ChangeLog
r277448 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: 12 (WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase): 13 * NetworkProcess/cache/CacheStorageEngine.cpp: 14 (WebKit::CacheStorage::Engine::writeFile): 15 * Shared/glib/ProcessExecutablePathGLib.cpp: 16 (WebKit::getExecutablePath): 17 * UIProcess/API/glib/IconDatabase.cpp: 18 (WebKit::IconDatabase::IconDatabase): 19 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: 20 (webkit_website_data_manager_get_disk_cache_directory): 21 * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: 22 (WebKit::bubblewrapSpawn): 23 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: 24 (WebKit::WebsiteDataStore::platformSetNetworkParameters): 25 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 26 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): 27 1 28 2021-05-13 Chris Dumez <cdumez@apple.com> 2 29 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
r277437 r277449 370 370 { 371 371 if (!FileSystem::fileExists(m_storageDirectoryPath)) { 372 if (!FileSystem::makeAllDirectories(FileSystem:: directoryName(m_storageDirectoryPath))) {372 if (!FileSystem::makeAllDirectories(FileSystem::parentPath(m_storageDirectoryPath))) { 373 373 RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::open failed, error message: Failed to create directory database path: %" PUBLIC_LOG_STRING, this, m_storageDirectoryPath.utf8().data()); 374 374 return; -
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
r277448 r277449 464 464 m_ioQueue->dispatch([this, weakThis = makeWeakPtr(this), identifier = m_pendingCallbacksCounter, data = WTFMove(data), filename = filename.isolatedCopy()]() mutable { 465 465 466 String directoryPath = FileSystem:: directoryName(filename);466 String directoryPath = FileSystem::parentPath(filename); 467 467 if (!FileSystem::fileExists(directoryPath)) 468 468 FileSystem::makeAllDirectories(directoryPath); -
trunk/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp
r258309 r277449 39 39 CString executablePath = getCurrentExecutablePath(); 40 40 if (!executablePath.isNull()) 41 return FileSystem:: directoryName(FileSystem::stringFromFileSystemRepresentation(executablePath.data()));41 return FileSystem::parentPath(FileSystem::stringFromFileSystemRepresentation(executablePath.data())); 42 42 return { }; 43 43 } -
trunk/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
r276954 r277449 60 60 return; 61 61 62 auto databaseDirectory = FileSystem:: directoryName(path);62 auto databaseDirectory = FileSystem::parentPath(path); 63 63 FileSystem::makeAllDirectories(databaseDirectory); 64 64 if (!m_db.open(path)) { -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp
r267763 r277449 634 634 if (!priv->diskCacheDirectory) { 635 635 // The default directory already has the subdirectory. 636 priv->diskCacheDirectory.reset(g_strdup(FileSystem:: directoryName(WebKit::WebsiteDataStore::defaultNetworkCacheDirectory()).utf8().data()));636 priv->diskCacheDirectory.reset(g_strdup(FileSystem::parentPath(WebKit::WebsiteDataStore::defaultNetworkCacheDirectory()).utf8().data())); 637 637 } 638 638 return priv->diskCacheDirectory.get(); -
trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
r274417 r277449 901 901 const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH"); 902 902 if (execDirectory) { 903 String parentDir = FileSystem:: directoryName(FileSystem::stringFromFileSystemRepresentation(execDirectory));903 String parentDir = FileSystem::parentPath(FileSystem::stringFromFileSystemRepresentation(execDirectory)); 904 904 bindIfExists(sandboxArgs, parentDir.utf8().data()); 905 905 } … … 908 908 if (!executablePath.isNull()) { 909 909 // Our executable is `/foo/bar/bin/Process`, we want `/foo/bar` as a usable prefix 910 String parentDir = FileSystem:: directoryName(FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(executablePath.data())));910 String parentDir = FileSystem::parentPath(FileSystem::parentPath(FileSystem::stringFromFileSystemRepresentation(executablePath.data()))); 911 911 bindIfExists(sandboxArgs, parentDir.utf8().data()); 912 912 } -
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r276862 r277449 193 193 194 194 if (!cookieFile.isEmpty()) 195 SandboxExtension::createHandleForReadWriteDirectory(FileSystem:: directoryName(cookieFile), parameters.cookieStoragePathExtensionHandle);195 SandboxExtension::createHandleForReadWriteDirectory(FileSystem::parentPath(cookieFile), parameters.cookieStoragePathExtensionHandle); 196 196 } 197 197 -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r277357 r277449 269 269 // Resolve directories for file paths. 270 270 if (!m_configuration->cookieStorageFile().isEmpty()) { 271 m_resolvedConfiguration->setCookieStorageFile(resolveAndCreateReadWriteDirectoryForSandboxExtension(FileSystem:: directoryName(m_configuration->cookieStorageFile())));271 m_resolvedConfiguration->setCookieStorageFile(resolveAndCreateReadWriteDirectoryForSandboxExtension(FileSystem::parentPath(m_configuration->cookieStorageFile()))); 272 272 m_resolvedConfiguration->setCookieStorageFile(FileSystem::pathByAppendingComponent(m_resolvedConfiguration->cookieStorageFile(), FileSystem::pathGetFileName(m_configuration->cookieStorageFile()))); 273 273 } -
trunk/Source/WebKitLegacy/ChangeLog
r277357 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * Storage/StorageTracker.cpp: 12 (WebKit::ensureDatabaseFileExists): 13 1 14 2021-05-11 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebKitLegacy/Storage/StorageTracker.cpp
r277357 r277449 114 114 { 115 115 if (createIfDoesNotExist) 116 return FileSystem::makeAllDirectories(FileSystem:: directoryName(fileName));116 return FileSystem::makeAllDirectories(FileSystem::parentPath(fileName)); 117 117 118 118 return FileSystem::fileExists(fileName); -
trunk/Source/WebKitLegacy/win/ChangeLog
r277437 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * Plugins/PluginDatabase.cpp: 12 (WebCore::PluginDatabase::loadPersistentMetadataCache): 13 1 14 2021-05-13 Darin Adler <darin@apple.com> 2 15 -
trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp
r277357 r277449 516 516 // Skip metadata that points to plugins from directories that 517 517 // are not part of plugin directory list anymore. 518 String pluginDirectoryName = FileSystem:: directoryName(path);518 String pluginDirectoryName = FileSystem::parentPath(path); 519 519 if (m_pluginDirectories.find(pluginDirectoryName) == WTF::notFound) 520 520 continue; -
trunk/Tools/ChangeLog
r277448 r277449 1 2021-05-13 Chris Dumez <cdumez@apple.com> 2 3 Rename FileSystem::directoryName() to FileSystem::parentPath() 4 https://bugs.webkit.org/show_bug.cgi?id=225768 5 6 Reviewed by Darin Adler. 7 8 Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and 9 consistency with std::filesystem::parent_path() which is used internally. 10 11 * DumpRenderTree/win/DumpRenderTree.cpp: 12 (findFontFallback): 13 * TestWebKitAPI/Tests/WTF/FileSystem.cpp: 14 (TestWebKitAPI::TEST_F): 15 * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: 16 (TestWebKitAPI::Util::moduleDirectory): 17 1 18 2021-05-13 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r274407 r277449 1107 1107 static String findFontFallback(const char* pathOrUrl) 1108 1108 { 1109 String pathToFontFallback = FileSystem:: directoryName(pathOrUrl);1109 String pathToFontFallback = FileSystem::parentPath(pathOrUrl); 1110 1110 1111 1111 wchar_t fullPath[_MAX_PATH]; -
trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp
r277448 r277449 245 245 { 246 246 String path = String::fromUTF8("/test/a\u0308lo/test.txt"); 247 String directoryName = FileSystem:: directoryName(path);247 String directoryName = FileSystem::parentPath(path); 248 248 String expectedDirectoryName = String::fromUTF8("/test/a\u0308lo"); 249 249 EXPECT_TRUE(expectedDirectoryName == directoryName); … … 763 763 } 764 764 765 TEST_F(FileSystemTest, directoryName)765 TEST_F(FileSystemTest, parentPath) 766 766 { 767 767 auto testPath = FileSystem::pathByAppendingComponents(tempEmptyFolderPath(), { "subfolder", "filename.txt" }); 768 EXPECT_STREQ(FileSystem::pathByAppendingComponent(tempEmptyFolderPath(), "subfolder").utf8().data(), FileSystem:: directoryName(testPath).utf8().data());768 EXPECT_STREQ(FileSystem::pathByAppendingComponent(tempEmptyFolderPath(), "subfolder").utf8().data(), FileSystem::parentPath(testPath).utf8().data()); 769 769 #if OS(UNIX) 770 EXPECT_STREQ("/var/tmp", FileSystem:: directoryName("/var/tmp/example.txt").utf8().data());771 EXPECT_STREQ("/var/tmp", FileSystem:: directoryName("/var/tmp/").utf8().data());772 EXPECT_STREQ("/var/tmp", FileSystem:: directoryName("/var/tmp/.").utf8().data());773 EXPECT_STREQ("/", FileSystem:: directoryName("/").utf8().data());770 EXPECT_STREQ("/var/tmp", FileSystem::parentPath("/var/tmp/example.txt").utf8().data()); 771 EXPECT_STREQ("/var/tmp", FileSystem::parentPath("/var/tmp/").utf8().data()); 772 EXPECT_STREQ("/var/tmp", FileSystem::parentPath("/var/tmp/.").utf8().data()); 773 EXPECT_STREQ("/", FileSystem::parentPath("/").utf8().data()); 774 774 #endif 775 775 #if OS(WINDOWS) 776 EXPECT_STREQ("C:\\foo", FileSystem:: directoryName("C:\\foo\\example.txt").utf8().data());777 EXPECT_STREQ("C:\\", FileSystem:: directoryName("C:\\").utf8().data());776 EXPECT_STREQ("C:\\foo", FileSystem::parentPath("C:\\foo\\example.txt").utf8().data()); 777 EXPECT_STREQ("C:\\", FileSystem::parentPath("C:\\").utf8().data()); 778 778 #endif 779 779 } -
trunk/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
r242592 r277449 40 40 auto len = GetModuleFileName(nullptr, filename, bufferLength); 41 41 ASSERT(len > 0); 42 return FileSystem:: directoryName(String(filename, len));42 return FileSystem::parentPath(String(filename, len)); 43 43 } 44 44
Note:
See TracChangeset
for help on using the changeset viewer.