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