RemoveDirectoryA handled WINCE_NSPRPUB_RELEASE_4_2_BETA1
authorblythe%netscape.com
Fri, 08 Feb 2002 22:27:21 +0000
branchWINCE_NSPRPUB_RELEASE_4_2_BETA1
changeset 2234 476190c9af4c4de79717b557ccc67000e061a1d6
parent 2233 e460563a458a0817d325385743702fcebcea3707
child 2235 5d359b8e0b9ff964a8fa76acf429f31574d25406
push idunknown
push userunknown
push dateunknown
RemoveDirectoryA handled
pr/include/md/_win32_unicode.h
pr/src/md/windows/w32unicode.c
pr/src/md/windows/w95io.c
--- a/pr/include/md/_win32_unicode.h
+++ b/pr/include/md/_win32_unicode.h
@@ -102,11 +102,17 @@ WINAPI
 
 BOOL
 WINAPI
 _MD_CreateDirectoryA(
     LPCSTR lpPathName,
     LPSECURITY_ATTRIBUTES lpSecurityAttributes
     );
 
+BOOL
+WINAPI
+_MD_RemoveDirectoryA(
+    LPCSTR lpPathName
+    );
+
 #endif /* WINCE */
 
 #endif /* nspr_win32_unicode_h___ */
--- a/pr/src/md/windows/w32unicode.c
+++ b/pr/src/md/windows/w32unicode.c
@@ -376,9 +376,34 @@ WINAPI
     else
     {
         PR_SetError(PR_NAME_TOO_LONG_ERROR, 0);
     }
 
     return retval;
 }
 
+BOOL
+WINAPI
+_MD_RemoveDirectoryA(
+    LPCSTR lpPathName
+    )
+{
+    BOOL retval = FALSE;
+    LPWSTR wideStr = NULL;
+    WCHAR widePath[MAX_PATH + 1];
+
+    wideStr = _PR_MD_A2W(lpPathName, widePath, sizeof(widePath) / sizeof(WCHAR));
+    if(NULL != wideStr)
+    {
+        retval = RemoveDirectoryW(
+            wideStr
+            );
+    }
+    else
+    {
+        PR_SetError(PR_NAME_TOO_LONG_ERROR, 0);
+    }
+
+    return retval;
+}
+
 #endif /* WINCE */
\ No newline at end of file
--- a/pr/src/md/windows/w95io.c
+++ b/pr/src/md/windows/w95io.c
@@ -1280,17 +1280,17 @@ PRInt32
 
 PRInt32
 _PR_MD_RMDIR(const char *name)
 {
     if (
 #if !defined(WINCE)
         RemoveDirectory(name)
 #else
-        RemoveDirectoryA(name)
+        _MD_RemoveDirectoryA(name)
 #endif
         ) {
         return 0;
     } else {
 		_PR_MD_MAP_RMDIR_ERROR(GetLastError());
         return -1;
     }
 }