You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2010/10/02 15:21:46 UTC
svn commit: r1003794 -
/commons/proper/daemon/trunk/src/native/windows/src/log.c
Author: mturk
Date: Sat Oct 2 13:21:46 2010
New Revision: 1003794
URL: http://svn.apache.org/viewvc?rev=1003794&view=rev
Log:
Create a LogFile f they don't exist
Modified:
commons/proper/daemon/trunk/src/native/windows/src/log.c
Modified: commons/proper/daemon/trunk/src/native/windows/src/log.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/log.c?rev=1003794&r1=1003793&r2=1003794&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/log.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/log.c Sat Oct 2 13:21:46 2010
@@ -112,7 +112,16 @@ HANDLE apxLogOpen(
if (!szPath) {
if (GetSystemDirectoryW(sPath, MAX_PATH) == 0)
return INVALID_HANDLE_VALUE;
- lstrlcatW(sPath, MAX_PATH, L"\\LogFiles\\Apache");
+ lstrlcatW(sPath, MAX_PATH, L"\\LogFiles");
+ if (!CreateDirectoryW(sPath, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) {
+ if (!CreateDirectoryW(sPath, NULL))
+ return INVALID_HANDLE_VALUE;
+ }
+ lstrlcatW(sPath, MAX_PATH, L"\\Apache");
+ if (!CreateDirectoryW(sPath, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) {
+ if (!CreateDirectoryW(sPath, NULL))
+ return INVALID_HANDLE_VALUE;
+ }
}
else {
lstrlcpyW(sPath, MAX_PATH, szPath);