[Commits] [wesnoth/wesnoth] a6073c: fs: Fix normalize_path("") incongruity with Boost....

GitHub noreply at github.com
Sat Nov 8 05:30:57 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a6073c8a7c6e4fc7fdec6cf05691546d64a05637
      https://github.com/wesnoth/wesnoth/commit/a6073c8a7c6e4fc7fdec6cf05691546d64a05637
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-11-08 (Sat, 08 Nov 2014)

  Changed paths:
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  fs: Fix normalize_path("") incongruity with Boost.filesystem

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.





More information about the Commits mailing list