You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deleting the folder, other folders on the same level (not inside) get deleted as well
Steps to reproduce
create two directories: slider and slider-homepage. Delete only the slider directory - slider-homepage will get deleted as well
System Details
v3.6.1
Problem is in Modules/Media/Repositories/Eloquent/EloquentFolderRepository.php, line 85 return $this->model->where('path', 'like', "{$path}%")->get();
it tries to find all folders that start with the same string as the deleted folder. Perhaps missing forward slash would do the trick ? (seems it does for me) return $this->model->where('path', 'like', "{$path}/%")->get();
The text was updated successfully, but these errors were encountered:
becquerel
added a commit
to becquerel/Platform
that referenced
this issue
Jul 16, 2019
prevent deletion of folders that are NOT actually subfolders and only
start with the same sequence of characters. Originally, if I have two
or more folders on the same level:
`slider`
`slider-homepage`
and I delete only the `slider` one, `slider-homepage` would get deleted
as well.
This change makes sure the deleted folders are actually subfolders of
the deleted one.
Summary of issue
When deleting the folder, other folders on the same level (not inside) get deleted as well
Steps to reproduce
create two directories:
slider
andslider-homepage
. Delete only theslider
directory -slider-homepage
will get deleted as wellSystem Details
v3.6.1
Problem is in
Modules/Media/Repositories/Eloquent/EloquentFolderRepository.php
, line 85return $this->model->where('path', 'like', "{$path}%")->get();
it tries to find all folders that start with the same string as the deleted folder. Perhaps missing forward slash would do the trick ? (seems it does for me)
return $this->model->where('path', 'like', "{$path}/%")->get();
The text was updated successfully, but these errors were encountered: