[0.13.12] Factorio errors on game.write_file
Posted: Sun Jul 31, 2016 5:14 pm
Bug: Factorio game.write_file('foo', 'bar') or any combination of API calls to game.write_file fails if the user has symlinked the script-output directory to another location. No mods are required to reproduce, console commands show the error as well.
Steps to reproduce:
1. Symlink (or Hardlink on Windows) factorio/script-output to another directory (say, /tmp)
2. Launch new Factorio map
3. In console, execute /c game.write_file('foo', 'bar')
Error:
Not sure what the best solution here is, but doing this generates a whole lot of errors when users try to run mods, and they blame it on mods, instead of themselves. 
Steps to reproduce:
1. Symlink (or Hardlink on Windows) factorio/script-output to another directory (say, /tmp)
2. Launch new Factorio map
3. In console, execute /c game.write_file('foo', 'bar')
Error:
Code: Select all
Cannot execute command. Error: [string "game.write_file('foo', 'bar')"]:1: Scripts can only use file space inside of /home/afforess/.factorio/script-output (requested path was /home/afforess/.factorio/script-output/foo)
