*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 24 Sep 1997 05:45:29 +0200
changeset 2982 3032a3a7e17a
parent 2981 be69407cb552
child 2983 41ff593bd359
*** empty log message ***
DirStr.st
DirectoryStream.st
Filename.st
OpenVMSFilename.st
--- a/DirStr.st	Wed Sep 24 04:54:50 1997 +0200
+++ b/DirStr.st	Wed Sep 24 05:45:29 1997 +0200
@@ -331,7 +331,7 @@
 {
     struct dsc$descriptor_s res;
     char                    *p;
-    char                    buff[sizeof dd->entry.d_name];
+    char                    buff[sizeof dd->entry.d_name + 10];
     int                     i;
 
     /* Set up result descriptor, and get next file. */
@@ -360,6 +360,11 @@
     if (p = strchr(dd->entry.d_name, ';'))
 	*p = '\0';
 
+    /* claus: empty dirs seems to leave *.* in the buffer ... */
+    if (strcmp(dd->entry.d_name, "*.*") == 0) {
+	return NULL;
+    }
+
     dd->entry.d_namlen = strlen(dd->entry.d_name);
 
     dd->entry.vms_verscount = 0;
@@ -668,5 +673,5 @@
 !DirectoryStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.39 1997-09-20 21:06:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.40 1997-09-24 03:45:25 cg Exp $'
 ! !
--- a/DirectoryStream.st	Wed Sep 24 04:54:50 1997 +0200
+++ b/DirectoryStream.st	Wed Sep 24 05:45:29 1997 +0200
@@ -331,7 +331,7 @@
 {
     struct dsc$descriptor_s res;
     char                    *p;
-    char                    buff[sizeof dd->entry.d_name];
+    char                    buff[sizeof dd->entry.d_name + 10];
     int                     i;
 
     /* Set up result descriptor, and get next file. */
@@ -360,6 +360,11 @@
     if (p = strchr(dd->entry.d_name, ';'))
 	*p = '\0';
 
+    /* claus: empty dirs seems to leave *.* in the buffer ... */
+    if (strcmp(dd->entry.d_name, "*.*") == 0) {
+	return NULL;
+    }
+
     dd->entry.d_namlen = strlen(dd->entry.d_name);
 
     dd->entry.vms_verscount = 0;
@@ -668,5 +673,5 @@
 !DirectoryStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.39 1997-09-20 21:06:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.40 1997-09-24 03:45:25 cg Exp $'
 ! !
--- a/Filename.st	Wed Sep 24 04:54:50 1997 +0200
+++ b/Filename.st	Wed Sep 24 05:45:29 1997 +0200
@@ -1131,6 +1131,13 @@
     "
 !
 
+basicMakeDirectory
+    "create a directory with the receivers name.
+     Return true if successful, false if not."
+
+    ^ OperatingSystem createDirectory:(self osNameForDirectory)
+!
+
 copyTo:newName
     "copy the file - the argument must be convertable to a filename.
      Return true if successful, false if not."
@@ -1174,11 +1181,16 @@
     "create a directory with the receivers name.
      Return true if successful, false if not."
 
-    (OperatingSystem createDirectory:(self osNameForDirectory)) ifFalse:[
+    (self basicMakeDirectory) ifFalse:[
+	"/
+	"/ could have existed before ...
+	"/
 	(self exists and:[self isDirectory]) ifFalse:[
-	    ^ self fileCreationError:self
+	    self fileCreationError:self.
+	    ^ false
 	]
-    ]
+    ].
+    ^ true
 
     "Modified: 12.11.1996 / 12:25:22 / cg"
 !
@@ -2740,6 +2752,6 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.106 1997-09-23 13:54:20 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.107 1997-09-24 03:45:26 cg Exp $'
 ! !
 Filename initialize!
--- a/OpenVMSFilename.st	Wed Sep 24 04:54:50 1997 +0200
+++ b/OpenVMSFilename.st	Wed Sep 24 05:45:29 1997 +0200
@@ -1071,6 +1071,13 @@
 
 !OpenVMSFilename methodsFor:'file operations'!
 
+basicMakeDirectory
+    "create a directory with the receivers name.
+     Return true if successful, false if not."
+
+    ^ OperatingSystem executeCommand:('cre/dir ' , self osNameForDirectory)
+!
+
 recursiveRemove
     "remove the directory and all of its subfiles/subdirectories.
      Raise an error if not successful."
@@ -1121,5 +1128,5 @@
 !OpenVMSFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.14 1997-09-24 02:50:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFilename.st,v 1.15 1997-09-24 03:45:29 cg Exp $'
 ! !