From ebe6a0f64c3c3c1188e67fcc5d96ca1aec197bcc Mon Sep 17 00:00:00 2001 From: hummypkg Date: Fri, 4 Nov 2011 13:54:54 +0000 Subject: [PATCH] fix bug with duplicate files git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@506 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/browse/crop.jim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/mongoose/cgi-bin/browse/crop.jim b/var/mongoose/cgi-bin/browse/crop.jim index 7f8704d2..36e734af 100755 --- a/var/mongoose/cgi-bin/browse/crop.jim +++ b/var/mongoose/cgi-bin/browse/crop.jim @@ -29,6 +29,9 @@ if {[cgi_get do] eq "it"} { foreach f [glob -nocomplain "${base}.*"] { set tail [file tail $f] puts " $tail" + while {[file exists "$origdir/$tail"]} { + append tail "~" + } file rename $f "${origdir}/$tail" }