Skip to content

Commit

Permalink
FileManager: Fix building with clang
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
jcs authored and awesomekling committed Feb 5, 2020
1 parent 7d06e37 commit a3c79fc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Applications/FileManager/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,8 @@ bool copy_file(const String& src_path, const String& dst_path, const struct stat
if (errno != EISDIR) {
return false;
}
StringBuilder builder;
builder.appendf("%s/%s", dst_path, FileSystemPath(src_path).basename());
String dst_path = builder.to_string();
dst_fd = creat(dst_path.characters(), 0666);
auto dst_dir_path = String::format("%s/%s", dst_path.characters(), FileSystemPath(src_path).basename().characters());
dst_fd = creat(dst_dir_path.characters(), 0666);
if (dst_fd < 0) {
return false;
}
Expand Down

0 comments on commit a3c79fc

Please sign in to comment.