I'm trying to create a new save file using the linux headless factorio server. I've setup a symbolic link from /opt/factorio/saves to /factorio/saves. However when I try to create a new save file in /opt/factorio/saves/test.zip it fails because the game checks that /opt/factorio/saves is a directory. How this should work is it should follow the symbolic link to /factorio/saves, and then perform the directory check, where it'll then create the new save file. Loading from a symbolic link location works fine, it's just when creating that the problem exists.
Code: Select all
Creating a new save file
0.000 2020-04-09 17:50:25; Factorio 0.18.18 (build 50828, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--create" "/opt/factorio/saves/test.zip"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /opt/factorio [192004/409560MB]
0.000 Binaries path: /opt/factorio/bin
0.010 System info: [CPU: AMD Ryzen 7 2700 Eight-Core Processor, 16 cores, RAM: 15930 MB]
0.011 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
0.011 Running in headless mode
0.016 Loading mod core 0.0.0 (data.lua)
0.071 Loading mod base 0.18.18 (data.lua)
0.309 Loading mod base 0.18.18 (data-updates.lua)
0.433 Checksum for core: 1106864506
0.433 Checksum of base: 332375697
0.603 Prototype list checksum: 586383188
0.639 Info PlayerData.cpp:70: Local player-data.json unavailable
0.639 Info PlayerData.cpp:75: Cloud player-data.json unavailable
0.645 Factorio initialised
0.646 Info Main.cpp:709: Creating new map /opt/factorio/saves/test.zip
1.463 Loading level.dat: 1068014 bytes.
1.463 Info Scenario.cpp:187: Map version 0.18.18-1
1.482 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 3441332399
1.526 Goodbye
0.000 Error Util.cpp:83: filesystem error: create_directories "/opt/factorio/saves" failed: Not a directory [/opt/factorio/saves]
Strangely, the game only checks if the final location in the path is a directory. So, if /opt/factorio/saves is a symbolic link to /factorio/saves. Then saving to /opt/factorio/saves/save1/test.zip works just fine (which actually becomes /factorio/saves/save1/test.zip).
Thanks,
exicx