Old 17th February 2005, 07:55   #1
jus
Junior Member
 
Join Date: Feb 2005
Posts: 3
How to skip an open file when compiling?

My script was failing compilation due to an already opened file by another process (sharing violation I guess):

File: failed opening file "C:\EIVA\NaviPac\Data\J047NPOUT611-3-923.npd"

!include: error in script: "NaviPacSections.nsh" on line 31

Error in script "C:\EIVA\NaviPac\bin\Scripts\navipac.nsi" on line 166 -- aborting creation process


In that case I would like the script to skip the file and continue compilation, not aborting. Is that possible?
jus is offline   Reply With Quote
Old 17th February 2005, 11:29   #2
flizebogen
Senior Member
 
Join Date: Jan 2002
Location: Berlin
Posts: 172
Try:

File /nonfatal "filename.ext"

main purpose for the nonfatal switch is to not abort if a file don't exists
flizebogen is offline   Reply With Quote
Old 17th February 2005, 12:02   #3
jus
Junior Member
 
Join Date: Feb 2005
Posts: 3
I've already tried that with no luck.

Section "Data" NAVIPAC_DATA
SetOverwrite on
File /nonfatal /r ${SCRIPT_ARG_SOURCEDIR}\Data
DetailPrint ">>> $INSTDIR\Data extracted..."
SectionEnd

Thanks anyway.
jus is offline   Reply With Quote
Old 17th February 2005, 16:59   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Please open a bug report about this.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th February 2005, 06:28   #5
jus
Junior Member
 
Join Date: Feb 2005
Posts: 3
Ok, done that under ID

1143585 Failing when compiling an already opened file
jus is offline   Reply With Quote
Old 2nd December 2005, 21:00   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Just to let you know, I have closed down the bug report and marked it as Won't Fix. As said in the report:
Quote:
During a discussion of a similar feature for !include, I've come to a conclusion that this is the correct behavior. The desired effect of /nonfatal, as also documented, is to ignore missing files. If the file is there and can't be opened, an error is very much justified.

You're more than welcome to submit a feature request for another flag that will ignore even these error.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump