--- a/FileBrowser.st Mon Sep 22 21:53:51 1997 +0200
+++ b/FileBrowser.st Wed Sep 24 06:43:08 1997 +0200
@@ -1853,7 +1853,7 @@
"for some binary files, if double clicked, we can do some useful
action ..."
- (currentDirectory construct:aFilename) isExecutable ifTrue:[
+ (currentDirectory construct:aFilename) isExecutableProgram ifTrue:[
(OperatingSystem executeCommand:'cd ', currentDirectory pathName, '; ',aFilename)
ifTrue:[^true].
].
@@ -2131,7 +2131,7 @@
path := currentDirectory filenameFor:fileName.
(path type == #regular) ifTrue:[
- path isExecutable ifTrue:[
+ path isExecutableProgram ifTrue:[
aBox initialText:(fileName , ' <arguments>').
^ self
].
@@ -2806,7 +2806,7 @@
doRemove
"remove the selected file(s) - no questions asked"
- |ok msg dir idx needUpdate toRemove updateRunning f|
+ |ok msg idx needUpdate toRemove updateRunning f|
updateRunning := listUpdateProcess notNil.
self stopUpdateProcess.
@@ -2820,6 +2820,8 @@
lockUpdate := true.
[
self selectedFilesDo:[:fileName |
+ |contents|
+
f := currentDirectory construct:fileName.
OperatingSystem accessDeniedErrorSignal handle:[:ex|
"was not able to remove it"
@@ -2827,12 +2829,10 @@
self showAlert:msg with:(OperatingSystem lastErrorString)
] do:[
f isDirectory ifTrue:[
- dir := DirectoryStream directoryNamed:f pathName.
- dir isEmpty ifTrue:[
- dir close.
+ contents := f directoryContents.
+ contents isEmpty ifTrue:[
f remove
] ifFalse:[
- dir close.
(self
ask:(resources string:'directory ''%1'' is not empty\remove anyway ?' with:fileName)
yesButton:'remove')
@@ -3928,5 +3928,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.196 1997-09-22 19:53:51 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.197 1997-09-24 04:43:08 cg Exp $'
! !