mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:17:35 +00:00
PixelPaint: Fix broken opening of files from Shell
The fd would get closed when the File went out of scope, so we couldn't open any file specified by 'pp <path to file>'. We need the fd to be alive and we solemnly swear to take good care of it and close it ourselves later.
This commit is contained in:
parent
9699648b2a
commit
5d732711a2
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ Result<void, String> ProjectLoader::try_load_from_path(StringView path)
|
|||
if (file_or_error.is_error())
|
||||
return String::formatted("Unable to open file because: {}", file_or_error.release_error());
|
||||
|
||||
return try_load_from_fd_and_close(file_or_error.release_value()->fd(), path);
|
||||
return try_load_from_fd_and_close(file_or_error.release_value()->leak_fd(), path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue