Author: mturk
Date: Tue Jun 30 08:25:50 2009
New Revision: 789609

URL: http://svn.apache.org/viewvc?rev=789609&view=rev
Log:
Directoy name needs at least one char beside backslash

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c?rev=789609&r1=789608&r2=789609&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c Tue Jun 30 
08:25:50 2009
@@ -152,7 +152,7 @@
         if (ACR_FileTypeGet(NULL, J2W(target)) == ACR_FT_DIR) {
             dwFlags = SYMBOLIC_LINK_FLAG_DIRECTORORY;
         }
-        else if (tlen > 0 && J2W(target)[tlen - 1 ] == L'\\') {
+        else if (tlen > 1 && J2W(target)[tlen - 1 ] == L'\\') {
             dwFlags = SYMBOLIC_LINK_FLAG_DIRECTORORY;
         }
         if (ACR_HAVE_LATE_DLL_FUNC(CreateSymbolicLinkW)) {
@@ -186,7 +186,7 @@
                 goto bailout;
             }
             tlen = wcslen(fpath);
-            if (tlen > 0 && fpath[tlen - 1] == L'\\') {
+            if (tlen > 1 && fpath[tlen - 1] == L'\\') {
                 fpath[--tlen] = L'\0';
             }
             /* Remove the link directory if already exists */


Reply via email to