Inexistent temp path leads to deleted files #47

Closed
slackfan opened this Issue Feb 6, 2012 · 1 comment

Comments

Projects
None yet
2 participants

slackfan commented Feb 6, 2012

E:>set TMP=E:\inexistent
E:>set TEMP=E:\inexistent
E:>dir Installation\integration
Volume in drive E is Data
Volume Serial Number is E222-A1111

Directory of E:\Installation\integration

06.02.2012 15:40

.
06.02.2012 15:40 ..
06.02.2012 12:14 104.414.549 aFile.zip
06.02.2012 13:26 3.370.398.641 bFile.zip
06.02.2012 15:01 11.636.519 installer.exe
3 File(s) 3.486.449.709 bytes
2 Dir(s) 51.610.136.576 bytes free

E:>call Installation\integration\installer.exe
FATAL ERROR: Failed to create installation directory.

E:>dir Installation\integration
Volume in drive E is Data
Volume Serial Number is E222-A1111

Directory of E:\Installation\integration

06.02.2012 15:41

.
06.02.2012 15:41 ..
06.02.2012 15:01 11.636.519 installer.exe
1 File(s) 11.636.519 bytes
2 Dir(s) 55.084.953.600 bytes free

E:>

This happens with Ocra-1.3.0. The key for this behavior is that the working directory is not the directory where the ocra executable is located. Seems Ocra tries to cleanup wrong files. Unfortunately when double clicking the Ocra executable via Windows Explorer, the working directory is always C:\Windows\System32, and never the Ocra executable base path. That's critical and happened on two systems I am aware of. Yes, it would be nice the TMP variable would be properly set, but that should imho still not happen.

slackfan commented Feb 7, 2012

I tried to understand the code but I failed. I don't see where the cleanup happens. Is this on C-side? It seems to happen when calling

createinstdir Ocra.debug_extract, !Ocra.debug_extract, Ocra.chdir_first

When setting Ocra.chdir_first to true, the issue persists.
When setting Ocra.debug_extract to true, the issue no more occurs. So this seems to be workaround.

larsch closed this in 9f9f384 Mar 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment