Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
This commit is contained in:
commit
d17eac735c
17 changed files with 39 additions and 39 deletions
|
|
@ -594,7 +594,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
|
|||
if (abi_index != -1) {
|
||||
exported = true;
|
||||
String abi = abis[abi_index];
|
||||
String dst_path = "lib/" + abi + "/" + p_so.path.get_file();
|
||||
String dst_path = String("lib").plus_file(abi).plus_file(p_so.path.get_file());
|
||||
Vector<uint8_t> array = FileAccess::get_file_as_array(p_so.path);
|
||||
Error store_err = store_in_apk(ed, dst_path, array);
|
||||
ERR_FAIL_COND_V(store_err, store_err);
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ Error EditorExportPlatformIOS::_walk_dir_recursive(DirAccess *p_da, FileHandler
|
|||
dirs.push_back(path);
|
||||
}
|
||||
} else {
|
||||
Error err = p_handler(current_dir + "/" + path, p_userdata);
|
||||
Error err = p_handler(current_dir.plus_file(path), p_userdata);
|
||||
if (err) {
|
||||
p_da->list_dir_end();
|
||||
return err;
|
||||
|
|
@ -784,7 +784,7 @@ Error EditorExportPlatformIOS::_export_additional_assets(const String &p_out_dir
|
|||
}
|
||||
}
|
||||
|
||||
String destination = destination_dir + "/" + asset.get_file();
|
||||
String destination = destination_dir.plus_file(asset.get_file());
|
||||
Error err = dir_exists ? da->copy_dir(asset, destination) : da->copy(asset, destination);
|
||||
memdelete(da);
|
||||
if (err) {
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||
|
||||
if (export_format == "dmg") {
|
||||
// write it into our application bundle
|
||||
file = tmp_app_path_name + "/" + file;
|
||||
file = tmp_app_path_name.plus_file(file);
|
||||
|
||||
// write the file, need to add chmod
|
||||
FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
|
||||
|
|
|
|||
|
|
@ -2997,7 +2997,7 @@ void OS_X11::alert(const String &p_alert, const String &p_title) {
|
|||
|
||||
for (int i = 0; i < path_elems.size(); i++) {
|
||||
for (unsigned int k = 0; k < sizeof(message_programs) / sizeof(char *); k++) {
|
||||
String tested_path = path_elems[i] + "/" + message_programs[k];
|
||||
String tested_path = path_elems[i].plus_file(message_programs[k]);
|
||||
|
||||
if (FileAccess::exists(tested_path)) {
|
||||
program = tested_path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue