However it does respect A_WorkingDir when it is compiled.
Code: Select all
SetWorkingDir, Bilder/
FileInstall, Bilder/a1AjOQ8_460sa.gif,a1AjOQ8_460sa.gif,1
Code: Select all
SetWorkingDir, Bilder/
FileInstall, Bilder/a1AjOQ8_460sa.gif,a1AjOQ8_460sa.gif,1
Why do you think it is a bug?AutoHotkey Help - Source wrote:The name of the file to be added to the compiled EXE. The file is assumed to be in (or relative to) the script's own directory if an absolute path isn't specified.
The file name must not contain double quotes, variable references (e.g. %A_ProgramFiles%), or wildcards...
When Source is extracted from the EXE, this is the name of the file to be created. It is assumed to be in %A_WorkingDir% if an absolute path isn't specified. The destination directory must already exist. Unlike Source, variable references may be used.
Code: Select all
ResultType Line::FileInstall(LPTSTR aSource, LPTSTR aDest, LPTSTR aFlag)
{
...
else
{
// v1.0.35.11: Must search in A_ScriptDir by default because that's where ahk2exe will search by default.
// The old behavior was to search in A_WorkingDir, which seems pointless because ahk2exe would never
// be able to use that value if the script changes it while running.
TCHAR aDestPath[MAX_PATH];
GetFullPathName(aDest, MAX_PATH, aDestPath, NULL);
SetCurrentDirectory(g_script.mFileDir);
success = CopyFile(aSource, aDestPath, !allow_overwrite);
SetCurrentDirectory(g_WorkingDir); // Restore to proper value.
}
#endif
return SetErrorLevelOrThrowBool(!success);
}
Users browsing this forum: Google [Bot] and 84 guests