This commit is contained in:
root 2019-10-08 15:00:45 +02:00
Родитель bf84a632fb
Коммит a94c4dcff8
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -434,10 +434,12 @@ class RecipeService {
if(isset($json['id']) && $json['id']) {
$recipe_folder = $user_folder->getById($json['id'])[0];
$path = $recipe_folder->getPath();
$path = dirname($path) . '/' . $json['name'];
$old_path = $recipe_folder->getPath();
$new_path = dirname($old_path) . '/' . $json['name'];
$recipe_folder->move($path);
if($old_path !== $new_path) {
$recipe_folder->move($new_path);
}
} else {
$recipe_folder = $user_folder->get($json['name']);