0.8.0.2
This commit is contained in:
22
Yuba.php
22
Yuba.php
@@ -405,7 +405,6 @@ $i = 0;
|
||||
$family = array();
|
||||
$fids = array();
|
||||
$noread = array();
|
||||
$fx = new SplFixedArray($passed_file);
|
||||
$splcount = 0;
|
||||
$bline = array();
|
||||
|
||||
@@ -418,24 +417,23 @@ foreach ($files as $splFileInfo) {
|
||||
$shellpath = escapeshellarg($splFileInfo->getPathname());
|
||||
$realpath = $splFileInfo->getRealPath();
|
||||
|
||||
$fid = md5($splFileInfo->getSize().$splFileInfo->getMtime().$splFileInfo->getBasename());
|
||||
|
||||
$key = md5($pathname);
|
||||
$pid = md5($pathname);
|
||||
$pkey = md5($path);
|
||||
$fid = null;
|
||||
|
||||
if (array_key_exists($key, $family)) {
|
||||
if (array_key_exists($pid, $family)) {
|
||||
echo msg("Duplicate key on ".$pathname.""); die;
|
||||
}
|
||||
|
||||
$family[$key] = array();
|
||||
$family[$pid] = array();
|
||||
|
||||
// Path-agnostic Unique File ID (to prevent redundant hashes and thumbs)
|
||||
|
||||
if ($splFileInfo->getType() != "dir" && $splFileInfo->getType() != "link") {
|
||||
|
||||
$fid = md5($splFileInfo->getSize().$splFileInfo->getMtime().$splFileInfo->getBasename());
|
||||
$dx[$fid][] = $pathname;
|
||||
$fx[$splcount] = array($fid, $pathname);
|
||||
$family[$key]['fid'] = $fid;
|
||||
$family[$pid]['fid'] = $fid;
|
||||
$splcount++;
|
||||
|
||||
}
|
||||
@@ -463,12 +461,14 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
if ($p['thumbs'] || $p['icons'] || $p['meta'] || $p['hash'] || $p['contents'] || $p['spotlight']) {
|
||||
|
||||
|
||||
|
||||
$parts = array();
|
||||
$parts[] = $bin_php;
|
||||
$parts[] = escapeshellarg(realpath("helper.php"));
|
||||
$parts[] = $i;
|
||||
$parts[] = $passed_total;
|
||||
$parts[] = $fid;
|
||||
$parts[] = $fid ?: $pid;
|
||||
$parts[] = escapeshellarg($pathname);
|
||||
$parts[] = $splFileInfo->getType();
|
||||
$parts[] = escapeshellarg($bpath);
|
||||
@@ -476,7 +476,6 @@ foreach ($files as $splFileInfo) {
|
||||
$parts[] = $p['spotlight'];
|
||||
|
||||
$tcmd = implode(" ",$parts);
|
||||
//msg($tcmd);
|
||||
$bline[] = $tcmd;
|
||||
|
||||
}
|
||||
@@ -489,7 +488,6 @@ foreach ($files as $splFileInfo) {
|
||||
|
||||
// Children
|
||||
|
||||
//$family[$pkey]['children'][] = $key;
|
||||
$family[$pkey]['children'][] = $i+1;
|
||||
|
||||
echo ProgressBar::next(true);
|
||||
@@ -1040,6 +1038,6 @@ $done = "Finished ".$zpath." in ".$seconds." seconds";
|
||||
$done_m = "Memory usage: ".prettysize(memory_get_usage(true));
|
||||
echo msg($done."\n".$done_m); notification($done);
|
||||
|
||||
unset($dbo, $dbp, $files, $family, $fx);
|
||||
unset($dbo, $dbp, $files, $family);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user