diff --git a/docs/notework.txt b/docs/notework.txt index 6a20916..ff4e123 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,9 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- When reading pathnames from Maximus 3 areafile GoldED+ had not + prepend Maximus path. Fixed. + - Fixed undo of the last removed line. - Improved a bit speed for long messages handling. diff --git a/goldlib/gall/gfilutl1.cpp b/goldlib/gall/gfilutl1.cpp index 03778dc..bc85e8c 100644 --- a/goldlib/gall/gfilutl1.cpp +++ b/goldlib/gall/gfilutl1.cpp @@ -219,8 +219,18 @@ void MakePathname(char* pathname, const char* path, const char* name) { return; } + bool have_path = false; + + if(isslash(tmpname[0])) + have_path = true; + #if defined(__HAVE_DRIVES__) + // Check if it's a root path (X:\) + else if(isalpha(tmpname[0]) and (tmpname[1] == ':') and isslash(tmpname[2])) + have_path = true; // The root is a directory + #endif + strchg(tmpname, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR); - if(strpbrk(tmpname, GOLD_SLASH_STR)) { + if(have_path) { strxcpy(pathname, tmpname, sizeof(Path)); } else {