use my_convert in !delfile
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4324 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8414047fd9
commit
0f7012e04e
1 changed files with 15 additions and 4 deletions
|
@ -1062,11 +1062,22 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
return PS_OK;
|
||||
|
||||
case TOK_P_DELFILE:
|
||||
if (unlink(line.gettoken_str(1)) == -1) {
|
||||
ERROR_MSG("!delfile: \"%s\" couldn't be deleted.\n", line.gettoken_str(1));
|
||||
return PS_ERROR;
|
||||
{
|
||||
char *file = line.gettoken_str(1);
|
||||
#ifndef _WIN32
|
||||
file = my_convert(file);
|
||||
#endif
|
||||
int result = unlink(file);
|
||||
#ifndef _WIN32
|
||||
my_convert_free(file);
|
||||
#endif
|
||||
if (result == -1) {
|
||||
ERROR_MSG("!delfile: \"%s\" couldn't be deleted.\n", line.gettoken_str(1));
|
||||
return PS_ERROR;
|
||||
}
|
||||
|
||||
SCRIPT_MSG("!delfile: \"%s\"\n", line.gettoken_str(1));
|
||||
}
|
||||
SCRIPT_MSG("!delfile: \"%s\"\n", line.gettoken_str(1));
|
||||
return PS_OK;
|
||||
|
||||
case TOK_P_APPENDFILE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue