File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -2578,18 +2578,12 @@ int Process::sys$realpath(const Syscall::SC_realpath_params* user_params)
2578
2578
if (custody_or_error.is_error ())
2579
2579
return custody_or_error.error ();
2580
2580
auto & custody = custody_or_error.value ();
2581
+ auto absolute_path = custody->absolute_path ();
2581
2582
2582
- // FIXME: Once resolve_path is fixed to deal with .. and . , remove the use of FileSystemPath::canonical_path.
2583
- FileSystemPath canonical_path (custody->absolute_path ());
2584
- if (!canonical_path.is_valid ()) {
2585
- dbg () << " FileSystemPath failed to canonicalize " << custody->absolute_path ();
2586
- ASSERT_NOT_REACHED ();
2587
- }
2588
-
2589
- if (canonical_path.string ().length () + 1 > params.buffer .size )
2583
+ if (absolute_path.length () + 1 > params.buffer .size )
2590
2584
return -ENAMETOOLONG;
2591
2585
2592
- copy_to_user (params.buffer .data , canonical_path. string (). characters (), canonical_path. string () .length () + 1 );
2586
+ copy_to_user (params.buffer .data , absolute_path. characters (), absolute_path .length () + 1 );
2593
2587
return 0 ;
2594
2588
};
2595
2589
You can’t perform that action at this time.
0 commit comments