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:
hummypkg 2011-11-04 13:54:54 +00:00
parent 20b2a7e2dc
commit ebe6a0f64c

View File

@ -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"
} }