deepnight/ldtk

Error when saving project "ENOTDIR: not a directory, mkdir"

Opened this issue · 2 comments

This appears to have been previously reported and resolved in LDtk 0.10.
Previous bug report: #484

Operating System: Fedora 40
LDtk 1.5.3 Appimage

What I did:

  1. Opened the example project "Entities"
  2. Enabled "Super simple export"
  3. Save As
  4. Chose an empty directory, and used world as the filename

image

Stack:

LDtk version: 1.5.3-64bits
ENOTDIR: not a directory, mkdir '/home/daniel/Development/gamble/gdtk/world/simplified'
Error
Error: ENOTDIR: not a directory, mkdir '/home/daniel/Development/gamble/gdtk/world/simplified'
    at Object.mkdirSync (node:fs:1395:3)
    at dn_js_NodeTools.createDirs (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:120386:15)
    at ui_ProjectSaver.beginState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286828:22)
    at ui_ProjectSaver.beginNextState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286395:8)
    at ui_ProjectSaver.beginState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286792:10)
    at ui_ProjectSaver.beginNextState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286395:8)
    at ui_modal_Progress.onComplete (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286719:13)
    at ui_modal_Progress.update (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:292611:10)
    at dn_Process._doMainUpdate (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:405:4)
    at dn_Process._doMainUpdate (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:432:15)

Processes:

#0 App
 |--- #5 page.Editor
       |--- #6 misc.FileWatcher
       |--- #7 display.WorldRender
       |--- #8 display.LevelRender
       |--- #9 display.Camera
       |--- #10 display.Rulers[--]
       |--- #11 tool.SelectionTool[--]
       |--- #12 tool.lt.DoNothing[--]
       |--- #13 WorldTool
       |--- #14 tool.PanView[--]
       |--- #15 tool.lt.EntityTool[--]
       |--- #43 display.EntityRender
       |--- #44 display.EntityRender
       |--- #45 display.EntityRender
       |--- #46 display.EntityRender
       |--- #47 display.EntityRender
       |--- #48 display.EntityRender
       |--- #49 display.EntityRender
       |--- #50 display.EntityRender
       |--- #51 display.EntityRender
       |--- #52 display.EntityRender
       |--- #53 display.EntityRender
       |--- #54 display.EntityRender
       |--- #55 display.EntityRender
       |--- #56 display.EntityRender
       |--- #57 display.EntityRender
       |--- #58 display.EntityRender
       |--- #59 display.EntityRender
       |--- #60 display.EntityRender
       |--- #61 display.EntityRender
       |--- #62 display.EntityRender
       |--- #63 display.EntityRender
       |--- #64 display.EntityRender
       |--- #65 display.EntityRender
       |--- #66 display.EntityRender
       |--- #67 display.EntityRender
       |--- #68 display.EntityRender
       |--- #69 display.EntityRender
       |--- #198 ui.modal.panel.EditProject
       |--- #213 ui.Notification
       |--- #219 ui.ProjectSaver
       |--- #220 ui.modal.MetaProgress
       |--- #222 ui.modal.Progress

Log:

[RENDER]       Rendering world level fields data.Level#f80e4bc0-66b0-11ec-b121-b327a018109c "Entities_demo"...
[RENDER]       Rendered level UI
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[RENDER]       Rendering world bg...
[FILE]         Remap project paths: /tmp/.mount_LDtk 1N2ewhP/extraFiles/samples => /home/daniel/Development/gamble/gdtk
[FILE]         Remap file path: atlas/Inca_front_by_Kronbits-extended.png => ../../../../../tmp/.mount_LDtk 1N2ewhP/extraFiles/samples/atlas/Inca_front_by_Kronbits-extended.png
[FILE]         Remap file path: atlas/Inca_back2_by_Kronbits.png => ../../../../../tmp/.mount_LDtk 1N2ewhP/extraFiles/samples/atlas/Inca_back2_by_Kronbits.png
[SAVE]         Preparing project saving: /home/daniel/Development/gamble/gdtk/world...
[CACHE]        Garbaging unused image LdtkIcons_80_240_16_16...
[CACHE]        Disposing cached image LdtkIcons_80_240_16_16...
[CACHE]        Garbaging unused image LdtkIcons_96_0_16_16...
[CACHE]        Disposing cached image LdtkIcons_96_0_16_16...
[CACHE]        Garbaging unused image LdtkIcons_224_176_16_16...
[CACHE]        Disposing cached image LdtkIcons_224_176_16_16...
[CACHE]        Garbaging unused image LdtkIcons_160_560_16_16...
[CACHE]        Disposing cached image LdtkIcons_160_560_16_16...
[CACHE]        Garbaging unused image LdtkIcons_144_16_16_16...
[CACHE]        Disposing cached image LdtkIcons_144_16_16_16...
[CACHE]        Garbaging unused image atlas/Inca_front_by_Kronbits-extended.png...
[CACHE]        Disposing cached image atlas/Inca_front_by_Kronbits-extended.png...
[CACHE]        Garbaging unused image atlas/Inca_back2_by_Kronbits.png...
[CACHE]        Disposing cached image atlas/Inca_back2_by_Kronbits.png...
[SAVE]         => PreChecks...
[SAVE]         => BeforeSavingActions...
[EVENT]        BeforeProjectSaving
[SAVE]         => AutoLayers...
[GENERAL]      Progress created.
[RENDER]       Rendering world bg...
[GENERAL]      Progress started: : "Preparing levels...", 1 operation(s)
[GENERAL]      Progress completed: "Preparing levels..." (0.1s)
[SAVE]         => SavingMainFile...
[GENERAL]      Progress created.
[RENDER]       Rendering world bg...
[GENERAL]      Progress started: : "Saving main file...", 2 operation(s)
[SAVE]           Preparing SavingData...
[SAVE]           Writing /home/daniel/Development/gamble/gdtk/world...
[GENERAL]      Progress completed: "Saving main file..." (0.1s)
[SAVE]         => WritingImages...
[GENERAL]      Page started: page.CrashReport()
[FILE]         Loading page template: crashReport from /tmp/.mount_LDtk 1N2ewhP/resources/app.asar/assets/tpl/pages/crashReport.html
[ERROR]        ENOTDIR: not a directory, mkdir '/home/daniel/Development/gamble/gdtk/world/simplified' (Error)
[ERROR]        Error: ENOTDIR: not a directory, mkdir '/home/daniel/Development/gamble/gdtk/world/simplified'
    at Object.mkdirSync (node:fs:1395:3)
    at dn_js_NodeTools.createDirs (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:120386:15)
    at ui_ProjectSaver.beginState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286828:22)
    at ui_ProjectSaver.beginNextState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286395:8)
    at ui_ProjectSaver.beginState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286792:10)
    at ui_ProjectSaver.beginNextState (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286395:8)
    at ui_modal_Progress.onComplete (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:286719:13)
    at ui_modal_Progress.update (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:292611:10)
    at dn_Process._doMainUpdate (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:405:4)
    at dn_Process._doMainUpdate (file:///tmp/.mount_LDtk%201N2ewhP/resources/app.asar/assets/js/renderer.js:432:15)

[GENERAL]      
#0 App
 |--- #5 page.Editor
       |--- #6 misc.FileWatcher
       |--- #7 display.WorldRender
       |--- #8 display.LevelRender
       |--- #9 display.Camera
       |--- #10 display.Rulers[--]
       |--- #11 tool.SelectionTool[--]
       |--- #12 tool.lt.DoNothing[--]
       |--- #13 WorldTool
       |--- #14 tool.PanView[--]
       |--- #15 tool.lt.EntityTool[--]
       |--- #43 display.EntityRender
       |--- #44 display.EntityRender
       |--- #45 display.EntityRender
       |--- #46 display.EntityRender
       |--- #47 display.EntityRender
       |--- #48 display.EntityRender
       |--- #49 display.EntityRender
       |--- #50 display.EntityRender
       |--- #51 display.EntityRender
       |--- #52 display.EntityRender
       |--- #53 display.EntityRender
       |--- #54 display.EntityRender
       |--- #55 display.EntityRender
       |--- #56 display.EntityRender
       |--- #57 display.EntityRender
       |--- #58 display.EntityRender
       |--- #59 display.EntityRender
       |--- #60 display.EntityRender
       |--- #61 display.EntityRender
       |--- #62 display.EntityRender
       |--- #63 display.EntityRender
       |--- #64 display.EntityRender
       |--- #65 display.EntityRender
       |--- #66 display.EntityRender
       |--- #67 display.EntityRender
       |--- #68 display.EntityRender
       |--- #69 display.EntityRender
       |--- #198 ui.modal.panel.EditProject
       |--- #213 ui.Notification
       |--- #219 ui.ProjectSaver
       |--- #220 ui.modal.MetaProgress
       |--- #222 ui.modal.Progress
 |--- #223 page.CrashReport

[FILE]         Cleared all file watches

If I do not use "Super simple export", it succeeds.

Edit: After saving, the tileset texture becomes solid purple.
Edit2: Both bugs also appear to be present in Ldtk 1.4 and 1.3.

This seems to be related to how the Appimage mounts ldtk (and example projects) to the /tmp directory. I was able to work around the issue by manually copying the assets and ldtk files from /tmp/.mount_LDtk <hash>/extraFiles to my project folder.