Pathnames prepending fix
This commit is contained in:
parent
ab55ba928f
commit
1cc9571a4c
@ -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.
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user