MBCS support for validate_filename and error flag for CreateDirectory/SetOutPath
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2184 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8dd7703d01
commit
f9e4da2fea
3 changed files with 16 additions and 19 deletions
|
@ -237,12 +237,10 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
}
|
||||
else update_status_text_from_lang(LANG_CREATEDIR,buf1);
|
||||
{
|
||||
char *tp;
|
||||
char *p;
|
||||
p=buf1;
|
||||
while (*p == ' ') p=CharNext(p);
|
||||
char *tp=CharNext(buf1);
|
||||
char *p=buf1;
|
||||
char c = 'c';
|
||||
if (*p) {
|
||||
tp=CharNext(p);
|
||||
if (*(WORD*)tp == CHAR2_TO_WORD(':','\\')) p=tp+2;
|
||||
else if (*(WORD*)p == CHAR2_TO_WORD('\\','\\'))
|
||||
{
|
||||
|
@ -250,21 +248,18 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
for (x = 0; x < 2; x ++)
|
||||
{
|
||||
while (*p != '\\' && *p) p=CharNext(p); // skip host then share
|
||||
if (*p) p=CharNext(p);
|
||||
p=CharNext(p);
|
||||
}
|
||||
|
||||
}
|
||||
else return 0;
|
||||
while (*p)
|
||||
while (c)
|
||||
{
|
||||
while (*p != '\\' && *p) p=CharNext(p);
|
||||
if (!*p) CreateDirectory(buf1,NULL);
|
||||
else
|
||||
{
|
||||
*p=0;
|
||||
CreateDirectory(buf1,NULL);
|
||||
*p++ = '\\';
|
||||
}
|
||||
c=*p;
|
||||
*p=0;
|
||||
g_flags.exec_error += !CreateDirectory(buf1,NULL);
|
||||
*p++ = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue