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
Locate function - bug with relative paths?
6 posts
Use $EXEDIR\files\sys\plugins
-Stu
-Stu
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
Jim
If you have to use relative paths (which I would not recommened) use SetOutPath $EXEDIR to set the correct working directory first.
-Stu
-Stu
I see no relative path problem. Make sure that "..\files\sys\plugins" exists, put this code before Locate function call:
If it not exist, use like say Afrow UK "SetOutPath $EXEDIR"
IfFileExists "..\files\sys\plugins\*.*" +2
MessageBox MB_OK "This directory isn't exist"
${Locate} "..\files\sys\plugins" "/M=com.fsp.f20.fu20.common_*" "getDirFullPath"
You are right, Instructor. Your function works fine. I made a stupid mistake and found out just now. My apologies!
Thanks again
Jim
Thanks again
Jim