Module: wine Branch: master Commit: 6a9e12709714d8ef68f3adb7a840a8091f86a319 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6a9e12709714d8ef68f3adb7a...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri May 11 12:36:39 2018 +0800
mstask: Write more correct flags and status to the job file.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mstask/task.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index aa50620..a5dd603 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -1252,8 +1252,10 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta fixed.priority = This->priority; fixed.maximum_runtime = This->maxRunTime; fixed.exit_code = 0; - fixed.status = SCHED_S_TASK_HAS_NOT_RUN; - fixed.flags = 0; + if (This->status == SCHED_S_TASK_NOT_SCHEDULED && This->trigger_count) + This->status = SCHED_S_TASK_HAS_NOT_RUN; + fixed.status = This->status; + fixed.flags = This->flags; memset(&fixed.last_runtime, 0, sizeof(fixed.last_runtime));
hfile = CreateFileW(task_name, GENERIC_WRITE, 0, NULL, disposition, 0, 0);