diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-03 18:59:45 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-03 18:59:54 +0100 |
commit | 95d210256524e08743870ed49f16162348d87a0d (patch) | |
tree | 3f9f430d5221cfc1737db353d4da4f7bfc8a3eb2 /misc/dist/html/editor.html | |
parent | 9db7e07d5a42737d48c4e230f7c4e451ea3dd689 (diff) |
[HTML5] Make home path persistent in editor.
We used to only persist specific sub-folder of /home/web_user/ when
running the Web Editor. This resulted in bad UX about default project
creation path etc.
This PR makes the whole folder persistent, move the zip preloading to a
different folder (to avoid persisting it), and automatically prompt the
user to import it if present.
Diffstat (limited to 'misc/dist/html/editor.html')
-rw-r--r-- | misc/dist/html/editor.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 53ad826730..540ab94e51 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -326,7 +326,7 @@ function startEditor(zip) { const INDETERMINATE_STATUS_STEP_MS = 100; - const persistentPaths = ['/home/web_user/.config', '/home/web_user/.cache', '/home/web_user/projects']; + const persistentPaths = ['/home/web_user/']; var editorCanvas = document.getElementById('editor-canvas'); var gameCanvas = document.getElementById('game-canvas'); @@ -493,11 +493,11 @@ engine.setUnloadAfterInit(false); // Don't want to reload when starting game. engine.init('godot.tools').then(function() { if (zip) { - engine.copyToFS("/home/web_user/preload.zip", zip); + engine.copyToFS("/tmp/preload.zip", zip); } try { // Avoid user creating project in the persistent root folder. - engine.copyToFS("/home/web_user/projects/keep", new Uint8Array()); + engine.copyToFS("/home/web_user/keep", new Uint8Array()); } catch(e) { // File exists } |