Page 1 of 1
[0.9.8] Save folder cannot be behind a junction point
Posted: Wed Jun 11, 2014 9:42 pm
by Warfire
Moving the Factorio save folder to somewhere else then using a junction point back to the normal folder causes an error when trying to load a save.
Junction like:
junction "D:\apps\Factorio_0.9.8.9400\saves" "D:\Dropbox\Games\Factorio\saves"
Causes error:
---------------------------
Error
---------------------------
boost::filesystem::create_directory: Cannot create a file when that file already exists: "D:/apps\Factorio_0.9.8.9400\saves"
---------------------------
OK
---------------------------
Win64 zip edition.
Works fine if I junction the other way (and make the real folder inside the Factorio folder) but that defeats the point.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Wed Jun 11, 2014 10:16 pm
by muzzy
You shouldn't use junction points for this anyway, use ntfs symlinks instead (see mklink /d)
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Thu Jun 12, 2014 8:49 am
by Warfire
There isn't a huge difference between junctions and symlinks for local volumes on a single machine, they are different yes but I can't see why this is a bad use of junctions since the folders are both local?
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Thu Jun 12, 2014 1:50 pm
by muzzy
I haven't used windows for years, but I was under impression that the new symlink mechanism was preferred over the junctions unless you really needed lowlevel junctions. I don't have any documentation to back this up though (and I stopped using windows before symlinks were implemented) so you can take it with a grain of salt...
Anyway, boost's filesystem library doesn't recognize junction points as directories. The symbolic links should work more transparently in this regard I believe.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Thu Jun 12, 2014 4:31 pm
by Warfire
I will give it a try as a symlink - thanks!
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Thu Jun 12, 2014 11:19 pm
by sfrazer
I can confirm that you need a symlink. I tried it both says before writing this up:
https://forums.factorio.com/wiki/inde ... _directory
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Fri Jun 13, 2014 1:13 pm
by kovarex
Ok, so it isn't a Factorio bug (I guess), so I'm moving it to not a bug.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Fri Jun 13, 2014 3:40 pm
by cube
It
IS a bug ... it just has a very low priority and a complicated solution
Known issues.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Fri Jun 13, 2014 4:09 pm
by muzzy
cube wrote:It
IS a bug ... it just has a very low priority and a complicated solution
Known issues.
The actual issue is that save directory isn't configurable, which forces the player to tweak with the filesystem. Make it configurable in config.ini and nobody cares about the junction issue anymore.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Fri Jun 13, 2014 4:13 pm
by kovarex
muzzy wrote:cube wrote:It
IS a bug ... it just has a very low priority and a complicated solution
Known issues.
The actual issue is that save directory isn't configurable, which forces the player to tweak with the filesystem. Make it configurable in config.ini and nobody cares about the junction issue anymore.
You can configure the write-folder in the ini
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Fri Jun 13, 2014 4:19 pm
by muzzy
kovarex wrote:You can configure the write-folder in the ini
You mean the "write-data"? The name is confusing so I have no idea what it does exactly, but I read it also affects mods, scenarios and some other things. Not an ideal solution for changing just the savegame folder.
Re: [0.9.8] Save folder cannot be behind a junction point
Posted: Sun Jun 14, 2015 5:28 pm
by tomzx
It appears, as of 0.11.22, that save data is properly saved in a folder behind a junction point. In my particular case, I have C:\Users pointing to E:\Users.
Autosave works perfectly, I can also load the autosaves without issue. However, if I open the save menu (while in game), it crashes with the following:
Error Util.cpp:43: boost::filesystem::read_symlink: The process cannot access the file because it is being used by another process: "C:/Users
Note how the error message is truncated.