|
|
#1 |
|
Junior Member
Join Date: Feb 2006
Posts: 5
|
RecFind.nsh and RmDir
In my uninstall section I need to perform some operation with the files in the subdirectories of $INSTDIR. To navigate the files I use the RecFind.nsh macro (here). Then I want to remove all the subdirectories (RmDir /R).
... ${RecFindOpen} "$INSTDIR\SUB" $R0 $R1 DetailPrint "dir: $R0" ${RecFindFirst} DetailPrint "File: $INSTDIR\SUB$R0\$R1" ; Some operations with the file (not important) ${RecFindNext} ${RecFindClose} SetOutPath $TEMP RmDir /r $INSTDIR\SUB ... Now suppose the following structure (A and B are directories): $INSTDIR\SUB\A\ $INSTDIR\SUB\B\ If I uninstall my program only the directory A will be deleted. If I skip the RecFindOpen...RecFindClose RmDir work properly and the whole SUB directory will be deleted. The attached file is a script that shows the problem. Please help me. Thanks. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
There's no attachment, please try again.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2006
Posts: 5
|
Sorry !
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
It's a bug with RecFind.nsh. It doesn't close the search handle when recursing into another directory. You should try another function or wait for Afrow to fix it.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Well spotted kichik
![]() Please download RecFind.nsh again. -Stu |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Feb 2006
Posts: 5
|
Many thanks kichik and Afrow, I've just downloaded and it works perfectly.
Thanks again |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|