[Bug] Symbolic links are not resolved (RESOLVED: NOT A BUG)
Sat, 2015-10-03 14:14
This one affects Linux-based operating systems:
If you store something in the Hedgewars user directory (“$HOME/.hedgewars” under GNU/Linux) and replace any of the folders with a symbolic link, Hedgewars is unable to find any file
Example:
$HOME/.hedgewars/Data/Scripts is replaced by a symbolic link on $HOME/mycode/Hedgewars and in the 2nd folder there are all my scripts installed.
Now if I start Hedgewars, everything in Scripts is invisible to Hedgewars, no scripts appear in-game. I have to remove the symbolic link and physically move the original files back to a read Scripts folder to make it work.
Hi, I am a Hedgewars developer.
We disabled symlinks in PhysFs on purpose, so that people can't distribute symlinks via .hwp files and use them to potentially access files that do not belong to Hedgewars.
sheepluva <- me my code stats ->
a Hedgewars Developer
click here to message me
<- where I'm from what I speak ->
So how would that be possible? If I symlink ~/test.lua to ~/.hedgewars/Data/Scripts/Multiplayer/test.lua and inside the file load "SomethingElse.lua", it will load it from ~/.hedgewars/Data/Scripts/Multiplayer, not from ~/?
AFAIK, it will load nothing, because test.lua will not be read pr executes by Hedgewars at all, because test.lia iin Data is a symlink, rather than a file... and symlinks are not being followed.
sheepluva <- me my code stats ->
a Hedgewars Developer
click here to message me
<- where I'm from what I speak ->