CC-2534: When copy files into storage folder it says wrong path name

filter all functions via realpath which will make directories consistent
This commit is contained in:
martin 2011-07-12 17:05:40 -04:00
parent 6972150b19
commit 1411987b01
5 changed files with 8 additions and 10 deletions

View file

@ -157,15 +157,13 @@ class MusicDir {
public static function splitFilePath($p_filepath)
{
$mus_dir = self::getWatchedDirFromFilepath($p_filepath);
if(is_null($mus_dir)) {
return null;
}
$length_dir = strlen($mus_dir->getDirectory());
$length_filepath = strlen($p_filepath);
$length = $length_filepath - $length_dir;
$fp = substr($p_filepath, $length_dir+1, $length);
$fp = substr($p_filepath, $length_dir);
return array($mus_dir->getDirectory(), $fp);
}

View file

@ -417,7 +417,7 @@ class StoredFile {
$music_dir = MusicDir::getDirByPK($this->_file->getDbDirectory());
$filepath = $this->_file->getDbFilepath();
return $music_dir->getDirectory()."/".$filepath;
return $music_dir->getDirectory().$filepath;
}
/**