mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 12:27:21 +00:00
Added an way for keeping temp files
This commit is contained in:
parent
0db67d7425
commit
d3d5b880b6
@ -22,6 +22,7 @@ class Test
|
||||
end
|
||||
|
||||
def unlink_tmp_files
|
||||
return if (ENV["KEEP_TMPFILES"] == "1")
|
||||
n = "mkvtoolnix-auto-test-" + $$.to_s + "-"
|
||||
Dir.entries("/tmp").each do |e|
|
||||
File.unlink("/tmp/#{e}") if ((e =~ /^#{n}/) and
|
||||
@ -74,7 +75,7 @@ class Test
|
||||
def hash_tmp(erase = true)
|
||||
output = hash_file(@tmp)
|
||||
if (erase)
|
||||
File.unlink(@tmp) if (File.exists?(@tmp))
|
||||
File.unlink(@tmp) if (File.exists?(@tmp) && (ENV["KEEP_TMPFILES"] != "1"))
|
||||
@debug_commands.push("rm #{@tmp}")
|
||||
@tmp = nil
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user