cc-1799 Human Filesystem

storage dir should be created first so then it's realpath can be inserted into the database.
This commit is contained in:
Naomi Aro 2011-06-23 17:51:38 +02:00
parent 7876552b38
commit e725e4fbe4
3 changed files with 8 additions and 10 deletions

View file

@ -800,12 +800,10 @@ class StoredFile {
if (PEAR::isError($duplicate)) {
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
}
else {
if (file_exists($duplicate->getFilePath())) {
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
}
}
if (file_exists($duplicate->getFilePath())) {
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
}
}
$storDir = MusicDir::getStorDir();