CreateDireectory now sets the error flag only when really needed instead of almost always
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2195 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
37d3df69f0
commit
3c26c3bfd3
3 changed files with 7 additions and 4 deletions
|
@ -258,7 +258,9 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
while (*p != '\\' && *p) p=CharNext(p);
|
||||
c=*p;
|
||||
*p=0;
|
||||
g_flags.exec_error += !CreateDirectory(buf1,NULL);
|
||||
if (!file_exists(buf1)) {
|
||||
g_flags.exec_error += !CreateDirectory(buf1,NULL);
|
||||
}
|
||||
*p++ = c;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,10 +103,10 @@ char *NSISCALL addtrailingslash(char *str)
|
|||
return str;
|
||||
}
|
||||
|
||||
char NSISCALL lastchar(const char *str)
|
||||
/*char NSISCALL lastchar(const char *str)
|
||||
{
|
||||
return *CharPrev(str,str+mystrlen(str));
|
||||
}
|
||||
}*/
|
||||
|
||||
void NSISCALL trimslashtoend(char *buf)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,8 @@ void NSISCALL doRMDir(char *buf, int recurse);
|
|||
HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd);
|
||||
int NSISCALL validpathspec(char *ubuf);
|
||||
char * NSISCALL addtrailingslash(char *str);
|
||||
char NSISCALL lastchar(const char *str);
|
||||
//char NSISCALL lastchar(const char *str);
|
||||
#define lastchar(str) *CharPrev(str,str+mystrlen(str))
|
||||
void NSISCALL trimslashtoend(char *buf);
|
||||
char * NSISCALL scanendslash(const char *str);
|
||||
int NSISCALL is_valid_instpath(char *s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue