Traverse tmpdir under chdir
This commit is contained in:
parent
777daae049
commit
a53435868e
@ -82,13 +82,15 @@ END {
|
|||||||
end
|
end
|
||||||
end.new(colorize)
|
end.new(colorize)
|
||||||
warn colorize.notice("Children under ")+colorize.fail(tmpdir)+":"
|
warn colorize.notice("Children under ")+colorize.fail(tmpdir)+":"
|
||||||
ls.list_tree(tmpdir) do |path, st|
|
Dir.chdir(tmpdir) do
|
||||||
|
ls.list_tree(".") do |path, st|
|
||||||
if st.directory?
|
if st.directory?
|
||||||
Dir.rmdir(path)
|
Dir.rmdir(path)
|
||||||
else
|
else
|
||||||
File.unlink(path)
|
File.unlink(path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
require "fileutils"
|
require "fileutils"
|
||||||
FileUtils.rm_rf(tmpdir)
|
FileUtils.rm_rf(tmpdir)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user