Author: alink
Date: Thu May 24 23:11:22 2007
New Revision: 17836
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17836&view=rev
Log:
More precise logs on the automatic detection of _main.cfg in sub-directories.
* display the exact path recorded in the files list (fix a previous small
imprecision)
* display a message when spotting the _main.cfg, react on it but don't record
it in any files list
(because I consider this a very strange behavior, even if it seems to never be
triggered)
Zero changes in the logs output on linux
Modified:
trunk/src/filesystem.cpp
Modified: trunk/src/filesystem.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.cpp?rev=17836&r1=17835&r2=17836&view=diff
==============================================================================
--- trunk/src/filesystem.cpp (original)
+++ trunk/src/filesystem.cpp Thu May 24 23:11:22 2007
@@ -450,6 +450,7 @@
/* generic Unix */
char *basename = entry->d_name;
#endif /* !APPLE */
+
std::string fullname;
if (directory.empty() || directory[directory.size()-1] == '/'
#ifdef __AMIGAOS4__
@@ -472,13 +473,19 @@
if (reorder == DO_REORDER &&
::stat((fullname+"/"+MAINCFG).c_str(), &st)!=-1 &&
S_ISREG(st.st_mode)) {
- LOG_FS << "_main.cfg found : " <<
fullname << "/" << MAINCFG << '\n';
+ LOG_FS << "_main.cfg found : ";
if (files != NULL) {
- if (mode == ENTIRE_FILE_PATH)
+ if (mode == ENTIRE_FILE_PATH) {
files->push_back(fullname + "/" + MAINCFG);
- else
+ LOG_FS << fullname <<
"/" << MAINCFG << '\n';
+ } else {
files->push_back(std::string(basename) + "/" + MAINCFG);
+ LOG_FS <<
std::string(basename) << "/" << MAINCFG << '\n';
}
+ } else {
+ // show what I consider strange
+ LOG_FS << fullname << "/" <<
MAINCFG << " not used now but skip the directory \n";
+ }
} else if (dirs != NULL) {
if (mode == ENTIRE_FILE_PATH)
dirs->push_back(fullname);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits