DirectoryContentsBrowser.st
changeset 18454 b4bea4fece8a
parent 18378 038d4cd9135f
child 18491 bf6cf26dd840
--- a/DirectoryContentsBrowser.st	Wed Oct 10 20:41:28 2018 +0200
+++ b/DirectoryContentsBrowser.st	Wed Oct 10 20:56:05 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -2943,14 +2945,9 @@
     ].
 
     sum := 0.
-    aDirectory recursiveDirectoryContentsDo:[:fnString |
-        |fn|
-
-        fn := aDirectory construct:fnString.
-        fn isDirectory ifFalse:[
-            fn exists ifTrue:[     "/ cares for missing links in WinNT
-                sum := sum + fn fileSize
-            ].
+    aDirectory recursiveDirectoryContentsAsFilenamesDo:[:fn |
+        fn isRegularFile ifTrue:[
+            sum := sum + fn fileSize
         ].
     ].
     ^ sum / 1024