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:
parent
6972150b19
commit
1411987b01
5 changed files with 8 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue