cc-2882: Airtime cannot delete watched folder when is been renamed
- initial commit Conflicts: airtime_mvc/application/models/MusicDir.php
This commit is contained in:
parent
6a0a739cef
commit
46146d1216
7 changed files with 104 additions and 5 deletions
|
@ -283,6 +283,14 @@ class MusicDir {
|
|||
|
||||
public static function removeWatchedDir($p_dir){
|
||||
$p_dir = realpath($p_dir)."/";
|
||||
$real_path = realpath($p_dir)."/";
|
||||
if($real_path != "/"){
|
||||
$p_dir = $real_path;
|
||||
}else{
|
||||
// this is the case where user removes watched directory on
|
||||
// the file system directly.
|
||||
$p_dir .= "/";
|
||||
}
|
||||
$dir = MusicDir::getDirByPath($p_dir);
|
||||
if($dir == NULL){
|
||||
return array("code"=>1,"error"=>"'$p_dir' doesn't exist in the watched list.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue