Skip to content

New Map won't be saved #1

Description

@adfx

Hey,

first of all big thanks for your great work. Helps a lot with that map rotating issue.
Right after creating/sniffing a new blank map I sent a save command. I saw the folder created but sadly didn't check the content. Later when a restore was needed I realized the created folder is empty. The reason was pretty simple. I had no user_map0 and PersistData_2.data file at that point. I needed to create a forbiddenzone which can be deleted later. That creates those two files. Without all 4 files maploader.js fails saving a map. Here's the output:
`
Received Save Request: Grundkarte_leer_test
Created directory: /mnt/data/maploader/maps/Grundkarte_leer_test/
fs.js:114
throw err;
^

Error: ENOENT: no such file or directory, copyfile '/mnt/data/rockrobo/user_map0' -> '/mnt/data/maploader/maps/Grundkarte_leer_test/user_map0'
at Object.copyFileSync (fs.js:1728:3)
at copyFiles (/mnt/data/maploader/maploader.js:41:6)
at MqttClient.client.on (/mnt/data/maploader/maploader.js:27:3)
at MqttClient.emit (events.js:198:13)
at MqttClient._handlePublish (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/lib/client.js:1162:12)
at MqttClient._handlePacket (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/lib/client.js:351:12)
at work (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/lib/client.js:283:12)
at Writable.writable._write (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/lib/client.js:294:5)
at doWrite (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/mnt/data/node/node-v10.16.3-linux-armv7l/lib/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:417:5)
root@rockrobo:/mnt/data/maploader/maps# ll Grundkarte_leer_test/
total 8
drwxr-xr-x 2 root root 4096 Sep 22 13:29 ./
drwxr-xr-x 9 root root 4096 Sep 22 13:29 ../
root@rockrobo:/mnt/data/maploader/maps#
`

I suggest to mention that in README or possibly skipping files if they do not exist. Thanks and regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions