From c90a8006ccb28829bb0c40d85114147b81056008 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 12 Apr 2012 12:22:20 -0400 Subject: [PATCH] CC-3622: When changing location of the stor directory, the "organize" ubfolder is not being created. - I confirmed that Airtime was creating organize folder upon chaning stor dir but, still added a code which make sure it create organize folder if it's missing somehow. --- airtime_mvc/application/models/StoredFile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index acf026ef4..a5aee070f 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -809,7 +809,10 @@ Logging::log("getting media! - 2"); if (!isset($result)){//The file has no duplicate, so proceed to copy. $storDir = Application_Model_MusicDir::getStorDir(); $stor = $storDir->getDirectory(); - + // check if "organize" dir exists and if not create one + if(!file_exists($stor."/organize")){ + mkdir($stor."/organize", 0777); + } //check to see if there is enough space in $stor to continue. $enough_space = Application_Model_StoredFile::checkForEnoughDiskSpaceToCopy($stor, $audio_file); if ($enough_space){