forked from hummypkg/webif
fix bug with duplicate files
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@506 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
20b2a7e2dc
commit
ebe6a0f64c
@ -29,6 +29,9 @@ if {[cgi_get do] eq "it"} {
|
|||||||
foreach f [glob -nocomplain "${base}.*"] {
|
foreach f [glob -nocomplain "${base}.*"] {
|
||||||
set tail [file tail $f]
|
set tail [file tail $f]
|
||||||
puts " $tail"
|
puts " $tail"
|
||||||
|
while {[file exists "$origdir/$tail"]} {
|
||||||
|
append tail "~"
|
||||||
|
}
|
||||||
file rename $f "${origdir}/$tail"
|
file rename $f "${origdir}/$tail"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user