From 3cdfb8b3fe30007df93186ceaf342fd69e315977 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 3 Sep 2005 12:03:31 +0000 Subject: [PATCH] Only try to delete a file that actually exists. --- tests/run.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run.rb b/tests/run.rb index 128d07bc8..1b5c26822 100755 --- a/tests/run.rb +++ b/tests/run.rb @@ -24,7 +24,8 @@ class Test def unlink_tmp_files n = "mkvtoolnix-auto-test-" + $$.to_s + "-" Dir.entries("/tmp").each do |e| - File.unlink("/tmp/#{e}") if (e =~ /^#{n}/) + File.unlink("/tmp/#{e}") if ((e =~ /^#{n}/) and + File.exists?("/tmp/#{e}"))) end end