Unbreak importing files in the same directory as current file.
This commit fixes a bug introduced in commit 0d7aa0a1
.
This commit is contained in:
parent
e78edd9b94
commit
17f7a7b467
|
@ -806,6 +806,8 @@ bool SolveSpaceUI::ReloadAllImported(bool canCancel)
|
||||||
g->linkFile = newPath;
|
g->linkFile = newPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In a newly created group we only have an absolute path.
|
||||||
|
if(!g->linkFileRel.empty()) {
|
||||||
std::string rel = PathSepUNIXToPlatform(g->linkFileRel);
|
std::string rel = PathSepUNIXToPlatform(g->linkFileRel);
|
||||||
std::string fromRel = MakePathAbsolute(SS.saveFile, rel);
|
std::string fromRel = MakePathAbsolute(SS.saveFile, rel);
|
||||||
FILE *test = ssfopen(fromRel, "rb");
|
FILE *test = ssfopen(fromRel, "rb");
|
||||||
|
@ -818,6 +820,7 @@ bool SolveSpaceUI::ReloadAllImported(bool canCancel)
|
||||||
// can use the absolute filename to get us back. The relative path will be
|
// can use the absolute filename to get us back. The relative path will be
|
||||||
// updated below.
|
// updated below.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try_load_file:
|
try_load_file:
|
||||||
if(LoadEntitiesFromFile(g->linkFile, &(g->impEntity), &(g->impMesh), &(g->impShell)))
|
if(LoadEntitiesFromFile(g->linkFile, &(g->impEntity), &(g->impMesh), &(g->impShell)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user