From 40f26cb26097ab7ad62b18ec6018221616124b3f Mon Sep 17 00:00:00 2001 From: Luis Sanchez Date: Fri, 3 Dec 2021 17:45:45 +0100 Subject: [PATCH] Fix files_dropped in HTML5 export. (Ignore trailing slash when creating the temporary directory) --- platform/javascript/js/libs/library_godot_input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/javascript/js/libs/library_godot_input.js b/platform/javascript/js/libs/library_godot_input.js index 945dbba9020..f403e85a308 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']);