FindFileApplication.st
changeset 5787 7afc10d73559
parent 5786 3ae2d45d823f
child 5791 ee6a05f07dd8
--- a/FindFileApplication.st	Mon Mar 22 16:21:19 2004 +0100
+++ b/FindFileApplication.st	Mon Mar 22 18:09:29 2004 +0100
@@ -638,19 +638,21 @@
             notContentsPattern := notContentsPattern asLowercase
         ]
     ].
-    fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators.
-    fileToCompareAgainst isEmpty ifTrue:[
-        fileToCompareAgainst := nil.
-    ] ifFalse:[
-        fileToCompareAgainst includesMatchCharacters ifFalse:[
-            fileToCompareAgainst asFilename exists ifFalse:[
-                Dialog warn:('No such file: %1' bindWith:fileToCompareAgainst asString allBold).
-                ^ self.
+    searchForSameContents value ifTrue:[
+        fileToCompareAgainst := (self sameContentsAsHolder value ? '') withoutSeparators.
+        fileToCompareAgainst isEmpty ifTrue:[
+            fileToCompareAgainst := nil.
+        ] ifFalse:[
+            fileToCompareAgainst includesMatchCharacters ifFalse:[
+                fileToCompareAgainst asFilename exists ifFalse:[
+                    Dialog warn:('No such file: %1' bindWith:fileToCompareAgainst asString allBold).
+                    ^ self.
+                ].
+                fileToCompareAgainst asFilename isReadable ifFalse:[
+                    Dialog warn:('Cannot read: %1' bindWith:fileToCompareAgainst asString allBold).
+                    ^ self.
+                ]
             ].
-            fileToCompareAgainst asFilename isReadable ifFalse:[
-                Dialog warn:('Cannot read: %1' bindWith:fileToCompareAgainst asString allBold).
-                ^ self.
-            ]
         ].
     ].
 
@@ -1455,5 +1457,5 @@
 !FindFileApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.42 2004-03-22 15:21:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FindFileApplication.st,v 1.43 2004-03-22 17:09:29 cg Exp $'
 ! !