mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Only try to delete a file that actually exists.
This commit is contained in:
parent
6fe7ae4afd
commit
3cdfb8b3fe
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user