fixed bug #1631773 - file permission problem with ${LineFind}

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4918 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-02-02 19:51:06 +00:00
parent 7fd83c7114
commit cdacbb8b84

View file

@ -62,6 +62,8 @@ TrimNewLines
!ifndef TEXTFUNC_INCLUDED
!define TEXTFUNC_INCLUDED
!include FileFunc.nsh
!verbose push
!verbose 3
!ifndef _TEXTFUNC_VERBOSE
@ -192,12 +194,23 @@ TrimNewLines
!verbose pop
!macroend
!macro _TextFunc_TempFileForFile _FILE _RESULT
${${_TEXTFUNC_UN}GetParent} ${_FILE} ${_RESULT}
StrCmp ${_RESULT} "" 0 +2
StrCpy ${_RESULT} $EXEDIR
GetTempFileName ${_RESULT} ${_RESULT}
StrCmp ${_RESULT} "" 0 +2
GetTempFileName ${_RESULT}
!macroend
!macro LineFind
!ifndef ${_TEXTFUNC_UN}LineFind
!verbose push
!verbose ${_TEXTFUNC_VERBOSE}
!define ${_TEXTFUNC_UN}LineFind `!insertmacro ${_TEXTFUNC_UN}LineFindCall`
!insertmacro ${_TEXTFUNC_UN}GetParent
Function ${_TEXTFUNC_UN}LineFind
Exch $3
Exch
@ -304,10 +317,11 @@ TrimNewLines
goto $7
file:
StrCmp $1 '/NUL' +4
GetTempFileName $R4
StrCmp $1 '/NUL' notemp
!insertmacro _TextFunc_TempFileForFile $1 $R4
Push $R4
FileOpen $R4 $R4 w
notemp:
FileOpen $R5 $0 r
IfErrors preerror
@ -609,6 +623,8 @@ TrimNewLines
!verbose ${_TEXTFUNC_VERBOSE}
!define ${_TEXTFUNC_UN}FileJoin `!insertmacro ${_TEXTFUNC_UN}FileJoinCall`
!insertmacro ${_TEXTFUNC_UN}GetParent
Function ${_TEXTFUNC_UN}FileJoin
Exch $2
Exch
@ -636,9 +652,10 @@ TrimNewLines
StrCpy $2 ''
StrCmp $2 '' 0 +3
StrCpy $4 $0
goto +3
GetTempFileName $4
Goto notemp
!insertmacro _TextFunc_TempFileForFile $2 $4
CopyFiles /SILENT $0 $4
notemp:
FileOpen $3 $4 a
IfErrors error
FileSeek $3 -1 END