Dmitry Timoshkov : schedsvc: Print an error if the service couldn' t start monitoring the tasks directory.
Alexandre Julliard
julliard at winehq.org
Tue Apr 24 18:46:08 CDT 2018
Module: wine
Branch: master
Commit: 0f77a4cb8207dfdae6344e07d3e3d2217274094b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0f77a4cb8207dfdae6344e07d3e3d2217274094b
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Apr 24 16:13:20 2018 +0800
schedsvc: Print an error if the service couldn't start monitoring the tasks directory.
This happens for old prefixes with disabled updates.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/schedsvc/svc_main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 1ccc345..fb7732c 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -50,7 +50,14 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
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) return -1;
+ 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;
+ }
memset(&ov, 0, sizeof(ov));
ov.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
More information about the wine-cvs
mailing list