fixed bug #1699474 - file /a does not preserve folder attributes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5062 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bfe47ca072
commit
cdc43e825c
1 changed files with 13 additions and 6 deletions
|
@ -5975,7 +5975,7 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int *total
|
||||||
|
|
||||||
SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", new_spec.c_str());
|
SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", new_spec.c_str());
|
||||||
|
|
||||||
if (do_add_file_create_dir(*dirs_itr, new_dir, attrib) != PS_OK) {
|
if (do_add_file_create_dir(dir + '\\' + *dirs_itr, new_dir, attrib) != PS_OK) {
|
||||||
return PS_ERROR;
|
return PS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6199,10 +6199,13 @@ int CEXEBuild::add_file(const string& dir, const string& file, int attrib, const
|
||||||
ent.offsets[4]=0;
|
ent.offsets[4]=0;
|
||||||
ent.offsets[5]=0;
|
ent.offsets[5]=0;
|
||||||
|
|
||||||
a=add_entry(&ent);
|
if (ent.offsets[1] != INVALID_FILE_ATTRIBUTES)
|
||||||
if (a != PS_OK)
|
|
||||||
{
|
{
|
||||||
return a;
|
a=add_entry(&ent);
|
||||||
|
if (a != PS_OK)
|
||||||
|
{
|
||||||
|
return a;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -6233,8 +6236,12 @@ int CEXEBuild::do_add_file_create_dir(const string& local_dir, const string& dir
|
||||||
|
|
||||||
DWORD attr = GetFileAttributes(local_dir.c_str());
|
DWORD attr = GetFileAttributes(local_dir.c_str());
|
||||||
|
|
||||||
if (add_entry_direct(EW_SETFILEATTRIBUTES, ndc, attr) != PS_OK) {
|
if (attr != INVALID_FILE_ATTRIBUTES)
|
||||||
return PS_ERROR;
|
{
|
||||||
|
if (add_entry_direct(EW_SETFILEATTRIBUTES, ndc, attr) != PS_OK)
|
||||||
|
{
|
||||||
|
return PS_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue