harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r480075 - /harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
Date Tue, 28 Nov 2006 15:02:59 GMT
Author: pyang
Date: Tue Nov 28 07:02:57 2006
New Revision: 480075

URL: http://svn.apache.org/viewvc?view=rev&rev=480075
Log:
Revert the patch for HARMONY-2270([classlib][unit] tests.api.java.io.FileTest@test_mkdir failes
on win XP) and HARMONY-2157([classlib][luni]not able to make a directory whose length is greater
than 248), due to they caused VM crash on windows sometimes

Modified:
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c?view=diff&rev=480075&r1=480074&r2=480075
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
Tue Nov 28 07:02:57 2006
@@ -330,41 +330,7 @@
 I_32 VMCALL
 hyfile_mkdir (struct HyPortLibrary * portLibrary, const char *path)
 {
-    char *canonicalpath;
-    int returnVar;
-    int len = strlen(path);
-    int i=0;
-    int j=0;
-    int lastbackslash=0;
-    if(len >= 248){
-        len =len + 5;
-        canonicalpath = portLibrary->mem_allocate_memory(portLibrary, len);
-        strcpy(canonicalpath,"\\\\?\\");
-        for(i==0,j=4;i<len;i++){
-            if(path[i]=='.'){
-                if(path[i+1]=='\\'){
-                    i++;
-                }
-                if(path[i+1]=='.'){
-                    j=lastbackslash;
-                }
-            }
-            else{
-                if(path[i]=='\\'){
-                    lastbackslash = i;
-                }
-                canonicalpath[j]=path[i];
-                j++;
-            }
-        }
-        canonicalpath[j]='\0';
-        returnVar = CreateDirectory (canonicalpath, 0);
-        portLibrary->mem_free_memory(portLibrary, canonicalpath);
-    }else{
-        returnVar = CreateDirectory (path, 0);
-    }
-    
-  if (returnVar)
+  if (CreateDirectory (path, 0))
     {
       return 0;
     }



Mime
View raw message