regedit: Process registry input from stdin.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
37f159e1cb
commit
d8fd4bde38
|
@ -93,6 +93,7 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
|
|||
case ACTION_ADD: {
|
||||
WCHAR *filename = argv[*i];
|
||||
WCHAR hyphen[] = {'-',0};
|
||||
WCHAR *realname = NULL;
|
||||
FILE *reg_file;
|
||||
|
||||
if (!strcmpW(filename, hyphen))
|
||||
|
@ -100,7 +101,6 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
|
|||
else
|
||||
{
|
||||
int size;
|
||||
WCHAR *realname = NULL;
|
||||
WCHAR rb_mode[] = {'r','b',0};
|
||||
|
||||
size = SearchPathW(NULL, filename, NULL, 0, NULL, NULL);
|
||||
|
@ -124,13 +124,13 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
|
|||
HeapFree(GetProcessHeap(), 0, realname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
import_registry_file(reg_file);
|
||||
if (realname)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,realname);
|
||||
HeapFree(GetProcessHeap(), 0, realname);
|
||||
fclose(reg_file);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_DELETE:
|
||||
|
|
Loading…
Reference in New Issue