The non-BFS version of create_directory_if_missing_recursive() handles
relative path names (e.g. "foo") correctly and doesn't attempt to create
a parent that is left unspecified in the path (i.e. empty), but the BFS
version does, predictably failing the whole operation.
This fixes an issue where `./wesnoth -p data foo` from the source tree
would fail with `error filesystem: Could not create parents to foo` if
`foo` did not already exist, when using the Boost.filesystem-based
implementation. `./wesnoth -p data ./foo` would succeed because there is
a visible parent directory '.' that already exists and needs not be
created again.
The non-BFS version of normalize_path() returns an empty string when
passed an empty string, but the BFS version returns the normalized
version of the current working dir for the Wesnoth process.
Due to the way editor::start()'s arguments are built from the process
command line, the result of normalize_path("") gets passed to it when
starting with the --editor switch and no map path argument. If the
result describes a directory, the editor brings up the filechooser
dialog on that path; otherwise, it attempts to open it as a map file.
Making the BFS version of normalize_path() follow the non-BFS behavior
fixes the editor unexpectedly bringing up the filechooser when started
from the command line.
This fixes several bugs in the Lua interpreter:
* http://www.lua.org/bugs.html#5.2.1
* http://www.lua.org/bugs.html#5.2.2
* http://www.lua.org/bugs.html#5.2.3
Released on December 2013, this is the latest stable version as of the
writing of this patch.
This commit consists of a merge of the full diff between versions 5.2.0
and 5.2.3, with paths fixed (.c vs. .cpp). I only had to manually
reconcile the following two commits:
* f5e673e644
Replace all kinds of the constant pi representations.
* 299a29f99a
Fix an off-by-one past-the-end buffer read in lua