mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 15:00:38 +00:00
Add %TEMP% to _DIR$() folder specifications
Adds the %TEMP% directory to `_DIR$()` folder specifications.
This commit is contained in:
parent
4a66dabf08
commit
e799e79012
|
@ -27047,6 +27047,19 @@ qbs *func__dir(qbs* context_in){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qbs_equal(qbs_ucase(context),qbs_new_txt("TEMP"))||qbs_equal(qbs_ucase(context),qbs_new_txt("TEMP FILES"))){
|
||||||
|
#ifdef QB64_WINDOWS
|
||||||
|
CHAR osPath[MAX_PATH+1];
|
||||||
|
DWORD pathlen;
|
||||||
|
pathlen = GetTempPathA(261, osPath); //%TEMP%
|
||||||
|
char path[pathlen];
|
||||||
|
memcpy(path, &osPath, pathlen);
|
||||||
|
if (pathlen > 0){
|
||||||
|
return qbs_new_txt(path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//general fallback location
|
//general fallback location
|
||||||
#ifdef QB64_WINDOWS
|
#ifdef QB64_WINDOWS
|
||||||
|
|
Loading…
Reference in a new issue