Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
Gered | 972be491c3 | ||
Gered | c1e76aef82 |
|
@ -1116,6 +1116,7 @@ int GUI::RunProgram(int mode, char *Command) {
|
||||||
ConQuerySize(&W, &H);
|
ConQuerySize(&W, &H);
|
||||||
ConHideMouse();
|
ConHideMouse();
|
||||||
ConSuspend();
|
ConSuspend();
|
||||||
|
::ConClear();
|
||||||
|
|
||||||
if (*Command == 0) // empty string = shell
|
if (*Command == 0) // empty string = shell
|
||||||
Command = getenv(
|
Command = getenv(
|
||||||
|
|
14
s_util.cpp
14
s_util.cpp
|
@ -47,6 +47,15 @@ char *MakeBackup(char *FileName, char *NewName) {
|
||||||
if (l <= 0)
|
if (l <= 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
// disabling this! it works great on any filesystem not restricted
|
||||||
|
// to 8.3 filenames, but on DOS, it results in a backup filename being
|
||||||
|
// creating that is not legal if the file extension is already 3 characters
|
||||||
|
// long. this causes the checks here to work incorrectly. the end result of
|
||||||
|
// all of that is that file saving with the 'KeepBackups' option DISABLED
|
||||||
|
// results in your ORIGINAL file being deleted every time you save! ouch!
|
||||||
|
// since i am building this fork specifically for use on DOS, it only makes
|
||||||
|
// sense for me to keep the 8.3 DOS compatibility enabled anyway.
|
||||||
|
#if 0
|
||||||
/* try 1 */
|
/* try 1 */
|
||||||
strcpy(NewName, FileName);
|
strcpy(NewName, FileName);
|
||||||
strcat(NewName, "~");
|
strcat(NewName, "~");
|
||||||
|
@ -57,11 +66,12 @@ char *MakeBackup(char *FileName, char *NewName) {
|
||||||
return NewName;
|
return NewName;
|
||||||
if (copyfile(FileName, NewName) == 0)
|
if (copyfile(FileName, NewName) == 0)
|
||||||
return NewName;
|
return NewName;
|
||||||
#if 0
|
//#if 0
|
||||||
if (errno == 2)
|
if (errno == 2)
|
||||||
return NewName; /* file not found */
|
return NewName; /* file not found */
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* try 2: 8.3 */
|
/* try 2: 8.3 */
|
||||||
strcpy(NewName, FileName);
|
strcpy(NewName, FileName);
|
||||||
|
|
Reference in a new issue