ref: df3896f54b44385c80694c8f7504716ec18d9bff
parent: a56e333a3570f382c449f6e6a2f17fc0c8c23a3c
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Oct 3 12:23:58 EDT 2022
Default Disk Op. dir = desktop
--- a/src/ft2_diskop.c
+++ b/src/ft2_diskop.c
@@ -2251,13 +2251,18 @@
// first test if we can change the dir to the one stored in the config (if present)
if (FReq_ModCurPathU[0] == '\0' || UNICHAR_CHDIR(FReq_ModCurPathU) != 0)
{
- // nope, couldn't do that, set Disk Op. path to user/home directory
+ // nope, couldn't do that, set Disk Op. path to the user's desktop directory
#ifdef _WIN32
SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY, NULL, 0, FReq_ModCurPathU);
#else
char *home = getenv("HOME");
if (home != NULL)
+ {
+ UNICHAR_CHDIR(home);
UNICHAR_STRCPY(FReq_ModCurPathU, home);
+
+ UNICHAR_STRCAT(FReq_ModCurPathU, "/Desktop");
+ }
#endif
UNICHAR_CHDIR(FReq_ModCurPathU);
}