Login   Register  
PHP Classes
elePHPant
Icontem

Delete Root

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      TAR/GZIP/BZIP2/ZIP Archives  >  All threads  >  Delete Root  >  (Un) Subscribe thread alerts  
Subject:Delete Root
Summary:Delete Root
Messages:1
Author:Fullname
Date:2013-09-04 12:42:53
 

  1. Delete Root   Reply  
Picture of Fullname
Fullname
2013-09-04 12:42:53
Hi!

A option to delete the rootdir (often it is a tempdir) from the archive would be nice. I added this on line 220 and replace the tempdir from the name2-name:

else if (@file_exists($current))
{
$name2=$this->options['prepend'] .
preg_replace("/(\.+\/+)+/", "", ($this->options['storepaths'] == 0 && strstr($current, "/")) ?
substr($current, strrpos($current, "/") + 1) : $current);

$name2=str_replace("temp/" . $_SESSION['logintime'] . "/", "", $name2);

$files[] = array ('name' => $current, 'name2' => $name2,
'type' => @is_link($current) && $this->options['followlinks'] == 0 ? 2 : 0,
'ext' => substr($current, strrpos($current, ".")), 'stat' => stat($current));
}

Kind regards!
Andreas