#1604 some exceptions catching added
This commit is contained in:
parent
3a939c1e0f
commit
d381976633
1 changed files with 28 additions and 24 deletions
|
@ -982,6 +982,7 @@ class BasicStor extends Alib{
|
||||||
$res = `cd $tmpd; tar xf $fname`;
|
$res = `cd $tmpd; tar xf $fname`;
|
||||||
// clips:
|
// clips:
|
||||||
$d = dir($tmpdc); $entries=array(); $gunids=array();
|
$d = dir($tmpdc); $entries=array(); $gunids=array();
|
||||||
|
if($d !== false){
|
||||||
while (false !== ($entry = $d->read())) {
|
while (false !== ($entry = $d->read())) {
|
||||||
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
||||||
list(,$gunid, $ext) = $va;
|
list(,$gunid, $ext) = $va;
|
||||||
|
@ -998,6 +999,7 @@ class BasicStor extends Alib{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->close();
|
$d->close();
|
||||||
|
}
|
||||||
$res = TRUE;
|
$res = TRUE;
|
||||||
foreach($entries as $gunid=>$it){
|
foreach($entries as $gunid=>$it){
|
||||||
$rawMedia = "$tmpdc/{$it['rawMedia']}";
|
$rawMedia = "$tmpdc/{$it['rawMedia']}";
|
||||||
|
@ -1014,6 +1016,7 @@ class BasicStor extends Alib{
|
||||||
// playlists:
|
// playlists:
|
||||||
require_once"Playlist.php";
|
require_once"Playlist.php";
|
||||||
$d = dir($tmpdp);
|
$d = dir($tmpdp);
|
||||||
|
if($d !== false){
|
||||||
while ((!PEAR::isError($res)) && false !== ($entry = $d->read())) {
|
while ((!PEAR::isError($res)) && false !== ($entry = $d->read())) {
|
||||||
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
||||||
list(,$gunid, $ext) = $va;
|
list(,$gunid, $ext) = $va;
|
||||||
|
@ -1024,9 +1027,10 @@ class BasicStor extends Alib{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->close();
|
$d->close();
|
||||||
|
}
|
||||||
//@rmdir($tmpdc); @rmdir($tmpdp); @rmdir($tmpd);
|
//@rmdir($tmpdc); @rmdir($tmpdp); @rmdir($tmpd);
|
||||||
system("rm -rf $tmpdc"); system("rm -rf $tmpdp"); system("rm -rf $tmpd");
|
@system("rm -rf $tmpdc"); @system("rm -rf $tmpdp"); @system("rm -rf $tmpd");
|
||||||
unlink($tmpn);
|
@unlink($tmpn);
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue