diff options
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/export/export_plugin.cpp | 6 | ||||
-rw-r--r-- | platform/javascript/js/libs/library_godot_input.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index 018dd3b664..9733435584 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -380,7 +380,7 @@ bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p if (p_preset->get("vram_texture_compression/for_mobile")) { String etc_error = test_etc2(); - if (etc_error != String()) { + if (!etc_error.is_empty()) { valid = false; err += etc_error; } @@ -415,7 +415,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese // Find the correct template String template_path = p_debug ? custom_debug : custom_release; template_path = template_path.strip_edges(); - if (template_path == String()) { + if (template_path.is_empty()) { ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type"); template_path = find_export_template(_get_template_name(mode, p_debug)); } @@ -424,7 +424,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese return ERR_FILE_BAD_PATH; } - if (template_path != String() && !FileAccess::exists(template_path)) { + if (!template_path.is_empty() && !FileAccess::exists(template_path)) { EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path); return ERR_FILE_NOT_FOUND; } diff --git a/platform/javascript/js/libs/library_godot_input.js b/platform/javascript/js/libs/library_godot_input.js index 945dbba902..f403e85a30 100644 --- a/platform/javascript/js/libs/library_godot_input.js +++ b/platform/javascript/js/libs/library_godot_input.js @@ -262,7 +262,7 @@ const GodotInputDragDrop = { const DROP = `/tmp/drop-${parseInt(Math.random() * (1 << 30), 10)}/`; const drops = []; const files = []; - FS.mkdir(DROP); + FS.mkdir(DROP.slice(0, -1)); // Without trailing slash GodotInputDragDrop.pending_files.forEach((elem) => { const path = elem['path']; GodotFS.copy_to_fs(DROP + path, elem['data']); |