projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
423c730
)
lisp/parser.cpp: Use absolute directory when talking to the dictionary manager.
author
Florian Forster
<supertux@octo.it>
Sun, 28 Feb 2010 18:03:30 +0000
(18:03 +0000)
committer
Florian Forster
<supertux@octo.it>
Sun, 28 Feb 2010 18:03:30 +0000
(18:03 +0000)
SVN-Revision: 6457
src/lisp/parser.cpp
patch
|
blob
|
history
diff --git
a/src/lisp/parser.cpp
b/src/lisp/parser.cpp
index
fad69a1
..
d827c61
100644
(file)
--- a/
src/lisp/parser.cpp
+++ b/
src/lisp/parser.cpp
@@
-17,6
+17,7
@@
#include <sstream>
#include <stdexcept>
#include <tinygettext/tinygettext.hpp>
#include <sstream>
#include <stdexcept>
#include <tinygettext/tinygettext.hpp>
+#include <physfs.h>
#include "lisp/lisp.hpp"
#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#include "lisp/parser.hpp"
@@
-24,6
+25,7
@@
#include "physfs/ifile_stream.hpp"
#include "physfs/ifile_streambuf.hpp"
#include "supertux/globals.hpp"
#include "physfs/ifile_stream.hpp"
#include "physfs/ifile_streambuf.hpp"
#include "supertux/globals.hpp"
+#include "util/log.hpp"
#include "supertux/gameconfig.hpp"
#include "supertux/gameconfig.hpp"
@@
-76,7
+78,14
@@
Parser::parse(const std::string& filename)
}
if(dictionary_manager) {
}
if(dictionary_manager) {
- dictionary_manager->add_directory(dirname(filename));
+ std::string rel_dir = dirname (filename);
+ char **searchpath = PHYSFS_getSearchPath();
+ for(char** i = searchpath; *i != NULL; i++)
+ {
+ std::string abs_dir = std::string (*i) + PHYSFS_getDirSeparator () + rel_dir;
+ log_debug << "Adding " << abs_dir << std::endl;
+ dictionary_manager->add_directory (abs_dir);
+ }
dictionary = & (dictionary_manager->get_dictionary());
}
dictionary = & (dictionary_manager->get_dictionary());
}