#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`;
|
||||
// clips:
|
||||
$d = dir($tmpdc); $entries=array(); $gunids=array();
|
||||
if($d !== false){
|
||||
while (false !== ($entry = $d->read())) {
|
||||
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
||||
list(,$gunid, $ext) = $va;
|
||||
|
@ -998,6 +999,7 @@ class BasicStor extends Alib{
|
|||
}
|
||||
}
|
||||
$d->close();
|
||||
}
|
||||
$res = TRUE;
|
||||
foreach($entries as $gunid=>$it){
|
||||
$rawMedia = "$tmpdc/{$it['rawMedia']}";
|
||||
|
@ -1014,6 +1016,7 @@ class BasicStor extends Alib{
|
|||
// playlists:
|
||||
require_once"Playlist.php";
|
||||
$d = dir($tmpdp);
|
||||
if($d !== false){
|
||||
while ((!PEAR::isError($res)) && false !== ($entry = $d->read())) {
|
||||
if(preg_match("|^([0-9a-fA-F]{16})\.(.*)$|", $entry, $va)){
|
||||
list(,$gunid, $ext) = $va;
|
||||
|
@ -1024,9 +1027,10 @@ class BasicStor extends Alib{
|
|||
}
|
||||
}
|
||||
$d->close();
|
||||
}
|
||||
//@rmdir($tmpdc); @rmdir($tmpdp); @rmdir($tmpd);
|
||||
system("rm -rf $tmpdc"); system("rm -rf $tmpdp"); system("rm -rf $tmpd");
|
||||
unlink($tmpn);
|
||||
@system("rm -rf $tmpdc"); @system("rm -rf $tmpdp"); @system("rm -rf $tmpd");
|
||||
@unlink($tmpn);
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue