Преглед на файлове

Fix files_dropped in HTML5 export.
(Ignore trailing slash when creating the temporary directory)

(cherry picked from commit 40f26cb26097ab7ad62b18ec6018221616124b3f)

Luis Sanchez преди 3 години
родител
ревизия
e00d20aa5a
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      platform/javascript/js/libs/library_godot_input.js

+ 1 - 1
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']);