fix relativedir

This commit is contained in:
hummypkg 2017-05-28 21:53:22 +00:00
parent bf37608438
commit 646e512109
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Package: sweeper
Priority: optional
Section: misc
Version: 2.1.5-8
Version: 2.1.5-9
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif(>=1.4.0)

View File

@ -290,9 +290,13 @@ proc ::sweeper::resolvedir {dir} {
}
proc ::sweeper::relativedir {dir} {
return [string map \
[list "[file normalize $::auto::root]/" ""] \
set dir [string map \
[list [file normalize $::auto::root] ""] \
[file normalize $dir]]
if {[string index $dir 0] eq "/"} {
set dir [string range $dir 1 end]
}
return $dir
}
# returns true if the arguments are actually the same file