This patch helps to avoid manual creation of c:\windows\tasks in old Wine prefixes a user may have around.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/schedsvc/svc_main.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c index 8830d59970..81f5d321ae 100644 --- a/dlls/schedsvc/svc_main.c +++ b/dlls/schedsvc/svc_main.c @@ -74,6 +74,9 @@ 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)