From 3519a709524f3c8b4ea550838bcb863fe7e4a2c0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Nov 2006 17:45:02 +0000 Subject: move clean_dir() --- urpm/sys.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'urpm') diff --git a/urpm/sys.pm b/urpm/sys.pm index 5254fb95..e1d83f20 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -182,6 +182,14 @@ sub fix_fd_leak() { } } +sub clean_dir { + my ($dir) = @_; + + require File::Path; + File::Path::rmtree([$dir]); + mkdir $dir, 0755; +} + #- lock policy concerning chroot : # - lock rpm db in chroot # - lock urpmi db in / -- cgit v1.2.1