ULTIMA8: Avoid trying to make empty path name
This has no impact on most platforms, but it breaks Android.
This commit is contained in:
parent
8bdb40a69c
commit
3eb363ed7f
1 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ bool FileSystem::AddVirtualPath(const string &vpath, const string &realpath, con
|
|||
#ifdef DEBUG
|
||||
debugN(MM_INFO, "virtual path \"%s\": %s\n", vp.c_str(), fullpath.c_str());
|
||||
#endif
|
||||
if (!(fullpath.substr(0, 8) == "@memory/")) {
|
||||
if (!(fullpath.substr(0, 8) == "@memory/") && rp.length()) {
|
||||
if (!IsDir(fullpath)) {
|
||||
if (!create) {
|
||||
#ifdef DEBUG
|
||||
|
@ -271,7 +271,7 @@ bool FileSystem::rewrite_virtual_path(string &vfn) const {
|
|||
string::size_type pos = vfn.size();
|
||||
|
||||
while ((pos = vfn.rfind('/', pos)) != Std::string::npos) {
|
||||
// perr << vfn << ", " << vfn.substr(0, pos) << ", " << pos << Std::endl;
|
||||
// perr << vfn << ", '" << vfn.substr(0, pos) << "', " << pos << Std::endl;
|
||||
Std::map<Common::String, string>::const_iterator p = _virtualPaths.find(
|
||||
vfn.substr(0, pos));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue