mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
FileManager: Fix building with clang
FileUtils.cpp:131:34: error: cannot pass object of non-trivial type 'const AK::String' through variadic method; call will abort at runtime [-Wnon-pod-varargs]
This commit is contained in:
parent
7d06e37a63
commit
a3c79fcdff
1 changed files with 2 additions and 4 deletions
|
@ -127,10 +127,8 @@ bool copy_file(const String& src_path, const String& dst_path, const struct stat
|
||||||
if (errno != EISDIR) {
|
if (errno != EISDIR) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
StringBuilder builder;
|
auto dst_dir_path = String::format("%s/%s", dst_path.characters(), FileSystemPath(src_path).basename().characters());
|
||||||
builder.appendf("%s/%s", dst_path, FileSystemPath(src_path).basename());
|
dst_fd = creat(dst_dir_path.characters(), 0666);
|
||||||
String dst_path = builder.to_string();
|
|
||||||
dst_fd = creat(dst_path.characters(), 0666);
|
|
||||||
if (dst_fd < 0) {
|
if (dst_fd < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue