Ie, we add `+<counter>' rather than an ever-longer series of `+'s.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 Osstest/TestSupport.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 55541b1..8aed285 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -486,7 +486,8 @@ sub target_file_exists ($$) {
 
 sub next_unique_name ($) {
     my ($fnref) = @_;
-    $$fnref .= '+';
+    my $num = $$fnref =~ s/\+([1-9]\d*)$// ? $1 : 0;
+    $$fnref .= '+'.($num+1);
 }
 
 our $target_editfile_cancel_exception =
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to