Author: mordante
Date: Sat Nov 22 23:28:33 2008
New Revision: 30987

URL: http://svn.gna.org/viewcvs/wesnoth?rev=30987&view=rev
Log:
Test for a hardcoded relative datadir path.

When the path is hardcoded it should also test for relative paths. Based
on a patch by crimson_penguin.

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=30987&r1=30986&r2=30987&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Nov 22 23:28:33 2008
@@ -256,6 +256,12 @@
 {
        bool no_music = false;
        bool no_sound = false;
+
+       // The path can be hardcoded and it might be a relative path.
+       if(!game_config::path.empty() &&  game_config::path[0] != '/') {
+               game_config::path = get_cwd() + '/' + game_config::path;
+       }
+
        for(arg_ = 1; arg_ != argc_; ++arg_) {
                const std::string val(argv_[arg_]);
                if(val.empty()) {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to