forked from mirrors/0ad
Make real directory paths on the VFS predictable.
Partial revert/fix of2f19cf86d3and2567fee329. Before this diff, it was possible for a mod containing a cache/ or a config/ folder to get written to incorrectly. The issue is VFS can map multiple directories to one 'virtual' path, for reading mods. However, writing data is problematic: which path to choose? The only viable solution is to use a path relative to the highest priority directory encountered in the VFS path, or write paths could be 'hijacked' by lower-priority mods. This fixes these issues by: - Adding a new lookup mode ('Real-path') that explicitly picks the real path relative to the highest-priority subdirectory in the VFS Path. - Preventing overwriting a real directory with a lower priority one in general. - Revert c0c8132dd4's GetRealPath change, re-introducing the function as GetOriginalPath. This also cleans up some duplication that led to empty mod folders in the user mod path, and cleans up loading the 'user' mod. Note that the new 'realpath' lookup can still be somewhat complex with many mount points at various hierarchy levels, but it is at least predictable/deterministic without having to be careful about populating order. Fixes #2553 Differential Revision: https://code.wildfiregames.com/D3217 This was SVN commit r25104.
This commit is contained in:
@@ -48,7 +48,6 @@ RL client:
|
||||
Configuration:
|
||||
-conf=KEY:VALUE set a config value
|
||||
-nosound disable audio
|
||||
-noUserMod disable loading of the user mod
|
||||
-shadows enable shadows
|
||||
-vsync enable VSync, i.e. lock FPS to monitor refresh rate
|
||||
-xres=N set screen X resolution to 'N'
|
||||
|
||||
Reference in New Issue
Block a user