larsch/ocra — Issue #47: Inexistent temp path leads to deleted files
Author: slackfan
Created: 2012-02-06 15:00:28+00:00
State: open

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.