Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix #217 + Creating archives with a samba workspace now works (explor…
Browse files Browse the repository at this point in the history
…ation and extraction still impossible).
  • Loading branch information
thomasCresson committed Jul 9, 2013
1 parent 7d4fdb5 commit 4cfb3c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/core/classes/pclzip.lib.php
Expand Up @@ -5396,7 +5396,7 @@ function privSwapBackMagicQuotes()
function PclZipUtilPathReduction($p_dir)
{
$v_result = "";
// $scheme = parse_url($p_dir, PHP_URL_SCHEME) != NULL;
$scheme = parse_url($p_dir, PHP_URL_SCHEME) != null;

// ----- Look for not empty path
if ($p_dir != "") {
Expand Down Expand Up @@ -5441,7 +5441,7 @@ function PclZipUtilPathReduction($p_dir)
$v_skip--;
}
else {
$v_result = $v_list[$i].($i!=(sizeof($v_list)-1)? "/".$v_result : "");
$v_result = $v_list[$i].(( $i == 0 && $scheme)? "/" : "").($i!=(sizeof($v_list)-1)? "/".$v_result : "");
}
}
}
Expand Down

0 comments on commit 4cfb3c9

Please sign in to comment.