[PATCH 07/12] mstask: Write more correct flags and status to the job file.

Dmitry Timoshkov dmitry at baikal.ru
Thu May 10 23:36:39 CDT 2018


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 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 aa50620e53..a5dd603ff4 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);
-- 
2.16.3




More information about the wine-devel mailing list