Replace \ with / slashes in assembly relative paths on *nix.
This is done specifically targeting the case where an assembly initially made on Windows is transported to an *nix machine. On *nix, the paths will be already saved with /, and correctly read on Windows. On Windows however / is not a first-class separator, in particular it cannot be used in UNC-style paths \\?\ (which are the only paths that work with Unicode). See also: http://msdn.microsoft.com/en-us/library/aa365247.aspxpull/3/head
parent
69c509064c
commit
f62e95d7b6
10
src/file.cpp
10
src/file.cpp
|
@ -656,6 +656,16 @@ void SolveSpaceUI::ReloadAllImported(void) {
|
|||
Group *g = &(SK.group.elem[i]);
|
||||
if(g->type != Group::IMPORTED) continue;
|
||||
|
||||
#ifndef WIN32
|
||||
// Change backslashes to forward slashes on Unix.
|
||||
// Done unconditionally to get the displayed filename
|
||||
// consistent with current filesystem type.
|
||||
for(int j = 0; j < strlen(g->impFileRel); j++) {
|
||||
if(g->impFileRel[j] == '\\')
|
||||
g->impFileRel[j] = '/';
|
||||
}
|
||||
#endif
|
||||
|
||||
g->impEntity.Clear();
|
||||
g->impMesh.Clear();
|
||||
g->impShell.Clear();
|
||||
|
|
Loading…
Reference in New Issue