Dmitry Timoshkov : schedsvc: In case it's an old Wine prefix create c: \windows\tasks automatically.

Alexandre Julliard julliard at winehq.org
Mon Aug 27 16:18:16 CDT 2018


Module: wine
Branch: master
Commit: 4d44bc3715e2f4a5f9c027c023f6d83d58e0626a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4d44bc3715e2f4a5f9c027c023f6d83d58e0626a

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Aug 27 20:18:08 2018 +0800

schedsvc: In case it's an old Wine prefix create c:\windows\tasks automatically.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/schedsvc/svc_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 8830d59..a7af96e 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -74,14 +74,14 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
     GetWindowsDirectoryW(path, MAX_PATH);
     lstrcatW(path, tasksW);
 
+    /* Just in case it's an old Wine prefix with missing c:\windows\tasks */
+    CreateDirectoryW(path, NULL);
+
     htasks = CreateFileW(path, FILE_LIST_DIRECTORY, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
                          NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL);
     if (htasks == INVALID_HANDLE_VALUE)
     {
         ERR("Couldn't start monitoring %s for tasks, error %u\n", debugstr_w(path), GetLastError());
-        /* Probably this is an old prefix with disabled updates */
-        if (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_FILE_NOT_FOUND)
-            ERR("Please create the directory manually\n");
         return -1;
     }
 




More information about the wine-cvs mailing list