mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
Libraries: Convert DeprecatedFile
usages to LibFileSystem
This commit is contained in:
parent
1dc3ba6ed5
commit
c048cf2004
Notes:
sideshowbarker
2024-07-16 22:26:37 +09:00
Author: https://github.com/cammo1123
Commit: c048cf2004
Pull-request: https://github.com/SerenityOS/serenity/pull/17985
Reviewed-by: https://github.com/linusg
9 changed files with 51 additions and 33 deletions
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibFileSystem/FileSystem.h>
|
||||
#include <LibTest/JavaScriptTestRunner.h>
|
||||
#include <signal.h>
|
||||
|
@ -177,8 +176,19 @@ int main(int argc, char** argv)
|
|||
#endif
|
||||
}
|
||||
|
||||
test_root = Core::DeprecatedFile::real_path_for(test_root);
|
||||
common_path = Core::DeprecatedFile::real_path_for(common_path);
|
||||
auto test_root_or_error = FileSystem::real_path(test_root);
|
||||
if (test_root_or_error.is_error()) {
|
||||
warnln("Failed to resolve test root: {}", test_root_or_error.error());
|
||||
return 1;
|
||||
}
|
||||
test_root = test_root_or_error.release_value().to_deprecated_string();
|
||||
|
||||
auto common_path_or_error = FileSystem::real_path(common_path);
|
||||
if (common_path_or_error.is_error()) {
|
||||
warnln("Failed to resolve common path: {}", common_path_or_error.error());
|
||||
return 1;
|
||||
}
|
||||
common_path = common_path_or_error.release_value().to_deprecated_string();
|
||||
|
||||
if (chdir(test_root.characters()) < 0) {
|
||||
auto saved_errno = errno;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue