CC-5821: Airtime Analyzer: Ftp-uploaded folder doesn't get removed from organize
This commit is contained in:
parent
79687499aa
commit
6f1dd7987f
1 changed files with 4 additions and 4 deletions
|
@ -147,7 +147,7 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
//$relativePath is the folder name(if one) + track name, that was uploaded via ftp
|
//$relativePath is the folder name(if one) + track name, that was uploaded via ftp
|
||||||
$relativePath = substr($fullPath, strlen($basePath)-1);
|
$relativePath = substr($fullPath, strlen($basePath)-1);
|
||||||
|
|
||||||
//after the file is moved from organize store it's parent folder so we can delete it after
|
//after the file is moved from organize, store it's parent folder so we can delete it after
|
||||||
if (dirname($relativePath) != '/') {
|
if (dirname($relativePath) != '/') {
|
||||||
$pathToDelete = Application_Common_OsPath::join(
|
$pathToDelete = Application_Common_OsPath::join(
|
||||||
$basePath,
|
$basePath,
|
||||||
|
@ -155,11 +155,11 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
//if the uploaded file was not in a folder, DO NOT delete
|
//if the uploaded file was not in a folder, DO NOT delete
|
||||||
$pathToDelete = False;
|
$pathToDelete = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$relativePath = $_FILES["file"]["name"];
|
$relativePath = $_FILES["file"]["name"];
|
||||||
$pathToDelete = False;
|
$pathToDelete = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
|
|
||||||
$this->processUploadedFile($callbackUrl, $relativePath, $this->getOwnerId());
|
$this->processUploadedFile($callbackUrl, $relativePath, $this->getOwnerId());
|
||||||
|
|
||||||
if (!$pathToDelete) {
|
if ($pathToDelete) {
|
||||||
Logging::info($pathToDelete);
|
Logging::info($pathToDelete);
|
||||||
//delete the empty folder that was uploaded via ftp (if one)
|
//delete the empty folder that was uploaded via ftp (if one)
|
||||||
rmdir($pathToDelete);
|
rmdir($pathToDelete);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue