mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +00:00
Kernel: Fix broken passing of String as printf() argument in realpath()
This commit is contained in:
parent
d720388acf
commit
6fe0fa30f2
1 changed files with 2 additions and 2 deletions
|
@ -1866,8 +1866,8 @@ int Process::sys$realpath(const char* pathname, char* buffer, size_t size)
|
|||
// FIXME: Once resolve_path is fixed to deal with .. and . , remove the use of FileSystemPath::canonical_path.
|
||||
FileSystemPath canonical_path(custody->absolute_path());
|
||||
if (!canonical_path.is_valid()) {
|
||||
printf("FileSystemPath failed to canonicalize '%s'\n", custody->absolute_path());
|
||||
return 1;
|
||||
dbg() << "FileSystemPath failed to canonicalize " << custody->absolute_path();
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
strncpy(buffer, canonical_path.string().characters(), size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue