textual-engine icon indicating copy to clipboard operation
textual-engine copied to clipboard

file loader cannot handle absolute paths

Open bzlibby opened this issue 4 years ago • 1 comments

when loading a game/world, using the world's absolute file path will return an error:

{"name":"textual-engine","kind":"main","hostname":"medusa","pid":11587,"level":50,"err":{"message":"ENOENT: no such file or directory, open '/home/bzlibby/documents/textual-enginge/data/samples/hansel-and-gretel.yml'","name":"Error","stack":"Error: ENOENT: no such file or directory, open '/home/bzlibby/documents/textual-enginge/data/samples/hansel-and-gretel.yml'","code":"ENOENT"},"msg":"error during read","time":"2021-06-26T03:28:02.564Z","v":0}

steps to reproduce:

  1. $ make run
  2. $ load file://<absolute path to world file>
  3. see error message
  4. $ load file://<relative path to world file>
  5. see world load successfully

bzlibby avatar Jun 26 '21 03:06 bzlibby