fix relativedir
This commit is contained in:
parent
bf37608438
commit
646e512109
|
@ -1,7 +1,7 @@
|
||||||
Package: sweeper
|
Package: sweeper
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: misc
|
Section: misc
|
||||||
Version: 2.1.5-8
|
Version: 2.1.5-9
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
Maintainer: af123@hummypkg.org.uk
|
||||||
Depends: webif(>=1.4.0)
|
Depends: webif(>=1.4.0)
|
||||||
|
|
|
@ -290,9 +290,13 @@ proc ::sweeper::resolvedir {dir} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ::sweeper::relativedir {dir} {
|
proc ::sweeper::relativedir {dir} {
|
||||||
return [string map \
|
set dir [string map \
|
||||||
[list "[file normalize $::auto::root]/" ""] \
|
[list [file normalize $::auto::root] ""] \
|
||||||
[file normalize $dir]]
|
[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
|
# returns true if the arguments are actually the same file
|
||||||
|
|
Loading…
Reference in New Issue