forked from hummypkg/sweeper
allow wildcards in fileexists()
This commit is contained in:
parent
7745c19cfa
commit
27fb54e651
@ -1,7 +1,7 @@
|
|||||||
Package: sweeper
|
Package: sweeper
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: misc
|
Section: misc
|
||||||
Version: 2.1.2
|
Version: 2.1.3
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
Maintainer: af123@hummypkg.org.uk
|
||||||
Depends: webif(>=1.3.0-1)
|
Depends: webif(>=1.3.0-1)
|
||||||
|
@ -548,7 +548,11 @@ proc ::sweeper::fileexists {ts str folder} {
|
|||||||
set str [::sweeper::expand $ts $str]
|
set str [::sweeper::expand $ts $str]
|
||||||
}
|
}
|
||||||
log " FILEEXISTS($str)" 2
|
log " FILEEXISTS($str)" 2
|
||||||
return [file isfile $str]
|
set matches [glob -nocomplain \
|
||||||
|
-directory [file dirname $str] \
|
||||||
|
-tails [file tail $str]]
|
||||||
|
log " Matches($matches)" 2
|
||||||
|
return $([llength $matches] > 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ::sweeper::direxists {ts str folder} {
|
proc ::sweeper::direxists {ts str folder} {
|
||||||
|
Loading…
Reference in New Issue
Block a user