|View Issue Details [ Jump to Notes ] [ Related Changesets ]||[ Issue History ] [ Print ]|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003036||FSSCP||Platform-Engine interaction||public||2014-04-30 00:30||2015-01-22 14:29|
|Target Version||3.7.2||Fixed in Version||3.7.2 RC5|
|Summary||0003036: cf_exists does not search all dirs correctly on Linux (and probably OSX)|
|Description||Pretty much as it says. On Linux/OSX, some "directories" have two locations. |
cf_exists will only find files in the 2nd location, even though valid files may be in the 1st location. It should probably search both locations, with the 2nd one having precedence.
Definitely affects CF_TYPE_CONFIG, may affect other types as well.
Note: cf_exists_full correctly (?? maybe, haven't checked precedence) finds files in both locations.
|Steps To Reproduce||See attached mod.|
Press enter in the mainhall (or anywhere) to run a script that attempts to open test files in nearly all known locations.
Failure to open the file generates a warning.
Switch the cf.fileExists() 3rd param to true and all files will be found.
Add the relevant files to the relevant directories in ~/.fs_open/ and the files will be found.
|Additional Information||Found when using LUA cf.fileExists() with the 3rd param set to false. Note that setting the 3rd param to true is a workaround.|
|Tags||No tags attached.|
|I've attached a patch which should fix this issue, by causing this function to use the same lower level function as the other cf_exists* family of functions. This should simplify the code as a result, if there are no adverse effects from this behavior change. Since the behavioral difference appears to have been platform-specific, I don't anticipate issues.|
|Update the steps to reproduce with what I believe is a typo fix since cf_exists doesn't have 3 arguments but the referenced Lua counterpart does.|
|Patch doesn't seem to cause any issues for me on Windows with the MediaVPs and my recent trunk build, will test OS X tomorrow. Would like to hear results of general purpose gameplay testing and the mod test from a Linux user before I commit.|
|Works fine on Linux both playing a mission with mediavps_2014 & running the attached test mod.|
|Fix committed to trunk@11222.|
fs2open: trunk r11222
Timestamp: 2015-01-22 14:30:08
[ Details ] [ Diff ]
|Fix for Mantis 3036: This unifies the cf_exists function to behave like the other functions in the cf_exists* family, and simultaneously addresses the bug.|
|mod - /trunk/fs2_open/code/cfile/cfile.cpp||[ Diff ] [ File ]|
|2014-04-30 00:30||niffiwan||New Issue|
|2014-04-30 02:00||niffiwan||Description Updated||View Revisions|
|2014-04-30 02:00||niffiwan||Additional Information Updated||View Revisions|
|2014-05-08 23:46||niffiwan||File Added: mantis3036_mod.7z|
|2014-05-08 23:49||niffiwan||Steps to Reproduce Updated||View Revisions|
|2015-01-18 22:33||chief1983||Assigned To||=> chief1983|
|2015-01-18 22:33||chief1983||Status||new => assigned|
|2015-01-18 22:34||chief1983||File Added: 3036_proposed.diff|
|2015-01-18 22:35||chief1983||Note Added: 0016455|
|2015-01-18 22:36||chief1983||Status||assigned => code review|
|2015-01-18 22:40||chief1983||Note Added: 0016456|
|2015-01-18 22:40||chief1983||Steps to Reproduce Updated||View Revisions|
|2015-01-18 22:41||chief1983||Note Added: 0016457|
|2015-01-20 04:22||niffiwan||Note Added: 0016458|
|2015-01-22 14:21||chief1983||Changeset attached||=> fs2open trunk r11222|
|2015-01-22 14:21||chief1983||Note Added: 0016459|
|2015-01-22 14:21||chief1983||Status||code review => resolved|
|2015-01-22 14:21||chief1983||Resolution||open => fixed|
|2015-01-22 14:29||chief1983||Fixed in Version||=> 3.7.2 RC5|
|2015-01-22 14:29||chief1983||Target Version||=> 3.7.2|