Dmitry Timoshkov : schedsvc: Handle directory creation failure in SchRpcRegisterTask.

Alexandre Julliard julliard at winehq.org
Mon Apr 7 13:20:07 CDT 2014


Module: wine
Branch: master
Commit: 7e871b94d394e29ee95dad45220012684fef7a9f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7e871b94d394e29ee95dad45220012684fef7a9f

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Apr  7 14:30:23 2014 +0900

schedsvc: Handle directory creation failure in SchRpcRegisterTask.

---

 dlls/schedsvc/schedsvc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/schedsvc/schedsvc.c b/dlls/schedsvc/schedsvc.c
index 1b62b94..aa99b03 100644
--- a/dlls/schedsvc/schedsvc.c
+++ b/dlls/schedsvc/schedsvc.c
@@ -189,6 +189,11 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
         if (!p) p = strrchrW(full_name, '\\');
         *p = 0;
         hr = create_directory(full_name);
+        if (hr != S_OK && hr != HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS))
+        {
+            heap_free(full_name);
+            return hr;
+        }
         *p = '\\';
     }
 




More information about the wine-cvs mailing list