1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

HackStudio: Convert String::format() => String::formatted()

This commit is contained in:
Andreas Kling 2021-04-21 22:27:15 +02:00
parent 2a6a54dea5
commit 7747bfe5c0

View file

@ -250,9 +250,9 @@ bool copy_directory(String src_path, String dst_path, bool link)
}
String src_rp = Core::File::real_path_for(src_path);
src_rp = String::format("%s/", src_rp.characters());
src_rp = String::formatted("{}/", src_rp);
String dst_rp = Core::File::real_path_for(dst_path);
dst_rp = String::format("%s/", dst_rp.characters());
dst_rp = String::formatted("{}/", dst_rp);
if (!dst_rp.is_empty() && dst_rp.starts_with(src_rp)) {
fprintf(stderr, "cp: Cannot copy %s into itself (%s)\n",
@ -268,8 +268,8 @@ bool copy_directory(String src_path, String dst_path, bool link)
while (di.has_next()) {
String filename = di.next_path();
bool is_copied = copy_file_or_directory(
String::format("%s/%s", src_path.characters(), filename.characters()),
String::format("%s/%s", dst_path.characters(), filename.characters()),
String::formatted("{}/{}", src_path, filename),
String::formatted("{}/{}", dst_path, filename),
true, link);
if (!is_copied) {
return false;