fixed handling of relative paths such as \file.ext in do_add_file
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3598 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
010dc75a71
commit
c5af89209c
1 changed files with 7 additions and 6 deletions
|
@ -5492,14 +5492,15 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecn
|
|||
{
|
||||
char *s=dir+strlen(dir);
|
||||
while (s > dir && *s != PATH_SEPARATOR_C) s=CharPrev(dir,s);
|
||||
*s=0;
|
||||
#ifndef _WIN32
|
||||
if (!*dir)
|
||||
if (s == dir)
|
||||
{
|
||||
dir[0] = '.';
|
||||
dir[1] = 0;
|
||||
if (*s == PATH_SEPARATOR_C)
|
||||
sprintf(dir,"%c.",PATH_SEPARATOR_C);
|
||||
else
|
||||
strcpy(dir,".");
|
||||
}
|
||||
#endif
|
||||
else
|
||||
s[0]=0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue