improve bfolder to follow links
This commit is contained in:
parent
2cb9e076a6
commit
64333df82e
|
@ -1,7 +1,7 @@
|
||||||
Package: sweeper
|
Package: sweeper
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: misc
|
Section: misc
|
||||||
Version: 2.1.5-6
|
Version: 2.1.5-7
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
Maintainer: af123@hummypkg.org.uk
|
||||||
Depends: webif(>=1.4.0)
|
Depends: webif(>=1.4.0)
|
||||||
|
|
|
@ -230,7 +230,7 @@ proc ::sweeper::expand {ts str {orig ""}} {
|
||||||
"%filename" [$ts get file] \
|
"%filename" [$ts get file] \
|
||||||
"%basename" [$ts bfile] \
|
"%basename" [$ts bfile] \
|
||||||
"%folder" [$ts dir] \
|
"%folder" [$ts dir] \
|
||||||
"%bfolder" [string map [list "$::auto::root/" ""] [$ts dir]] \
|
"%bfolder" [relativedir [$ts dir]] \
|
||||||
\
|
\
|
||||||
%epname [$ts episode_name] \
|
%epname [$ts episode_name] \
|
||||||
%series [$ts get seriesnum] \
|
%series [$ts get seriesnum] \
|
||||||
|
@ -289,6 +289,12 @@ proc ::sweeper::resolvedir {dir} {
|
||||||
return "$::auto::root/$dir"
|
return "$::auto::root/$dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc ::sweeper::relativedir {dir} {
|
||||||
|
return [string map \
|
||||||
|
[list "[file normalize $::auto::root]/" ""] \
|
||||||
|
[file normalize $dir]]
|
||||||
|
}
|
||||||
|
|
||||||
# returns true if the arguments are actually the same file
|
# returns true if the arguments are actually the same file
|
||||||
proc ::sweeper::samefile {a b} {
|
proc ::sweeper::samefile {a b} {
|
||||||
if {![file exists $a] || ![file exists $b]} { return 0 }
|
if {![file exists $a] || ![file exists $b]} { return 0 }
|
||||||
|
|
Loading…
Reference in New Issue