|
|
#1 |
|
Guest
Posts: n/a
|
Locate function - bug with relative paths?
Hi all!
There seems to be a bug in the Locate Function in FileFunc.nsh. If I call it like this it works perfectly: ${Locate} "C:\installer\files\sys\plugins" "/M=com.fsp.f20.fu20.common_*" "getDirFullPath" If I try this (and this is what I actually need, unfortunately) it doesn't: ${Locate} "..\files\sys\plugins" "/M=com.fsp.f20.fu20.common_*" "getDirFullPath" Is there a work-around or a fix that one of you could offer? Thanks in advance Jim |
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Use $EXEDIR\files\sys\plugins
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hmm, unfortunately I have to use a relative path. All the install script can be sure of at execution time is that the "files" directory will be next to it: ..\files.
Jim |
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
If you have to use relative paths (which I would not recommened) use SetOutPath $EXEDIR to set the correct working directory first.
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
I see no relative path problem. Make sure that "..\files\sys\plugins" exists, put this code before Locate function call:
code: If it not exist, use like say Afrow UK "SetOutPath $EXEDIR" |
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
You are right, Instructor. Your function works fine. I made a stupid mistake and found out just now. My apologies!
Thanks again Jim |
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|