Ticket #8528: check-dir.diff
File check-dir.diff, 690 bytes (added by , 18 years ago) |
---|
-
main.cpp
168 168 // We add it here, so MD5-based detection will be able to 169 169 // read mixed case files 170 170 if (ConfMan.hasKey("path")) { 171 if (!Common::File::exists(ConfMan.get("path"))) { 171 char cur_dir[MAXPATHLEN]; 172 getcwd(cur_dir, MAXPATHLEN); 173 if (chdir(ConfMan.get("path").c_str())) { 172 174 warning("Game directory does not exist (%s)", ConfMan.get("path").c_str()); 173 175 return 0; 174 176 } 177 chdir(cur_dir); 175 178 Common::File::addDefaultDirectory(ConfMan.get("path")); 176 179 } else { 177 180 Common::File::addDefaultDirectory(".");