mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
FileSystem: Get rid of VFS::absolute_path() and teach Mount about custodies.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 13:49:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/874bffc729a
@@ -41,12 +41,11 @@ KResultOr<Region*> InodeFile::mmap(Process& process, LinearAddress preferred_lad
|
||||
return region;
|
||||
}
|
||||
|
||||
String InodeFile::absolute_path(FileDescriptor&) const
|
||||
String InodeFile::absolute_path(FileDescriptor& descriptor) const
|
||||
{
|
||||
auto path_or_error = VFS::the().absolute_path(const_cast<Inode&>(inode()));
|
||||
if (path_or_error.is_error())
|
||||
return { };
|
||||
return path_or_error.value();
|
||||
ASSERT_NOT_REACHED();
|
||||
ASSERT(descriptor.custody());
|
||||
return descriptor.absolute_path();
|
||||
}
|
||||
|
||||
KResult InodeFile::truncate(off_t size)
|
||||
|
||||
Reference in New Issue
Block a user