- summary: Relative path Delete always deletes from root --> relative path Delete doesn't work
- status: open --> closed-fixed
Summary: passing completely relative paths (no . or .. just the working directory) to Delete doesn't work.
Delete doesn't do well with relative paths. It breaks the paths it's given in to directory and filename, expands any wildcards in the filename and then deletes `directory\filename` for each filename. However, if the given path is relative and the extracted directory is actually empty, it'd delete `\filename` which is on the root of the drive.
The following script would delete C:\boot.ini if boot.ini can be found in the working directory - in this case $INSTDIR. In earlier versions of NSIS, where SetOutPath didn't set the working directory, boot.ini would have to be found in the working directory which Explorer sets.
SetOutPath $INSTDIR
Delete boot.ini
Original report at: