kohler / hotcrp

HotCRP conference review software
http://read.seas.harvard.edu/~kohler/hotcrp
Other
328 stars 111 forks source link

Fix creating docstore #311

Closed horlabs closed 9 months ago

horlabs commented 1 year ago

If docstore is set to true in the options.php, hotcrp fails to create the docs directory because in _make_fpath_parents $container will be <root>/docs and $fdir is <root>/docs/. Therefore, the check in line 470 strlen($container) < strlen($fdir) will be true and the function returns without creating the directory.

This fix removes trailing / from $fdir as it is done for $container and solves this problem.

kohler commented 9 months ago

Thanks, looks good!

kohler commented 9 months ago

Shit, I should have looked closer. There is a bug in your commit: it sets $container when it should set $fdir. But thanks all the same.

horlabs commented 9 months ago

Oh yes, sorry for that. Happend as i cleaned the code i think.