forked from 0x2620/pandora
really only put files into item with same folder not same folder prefix
This commit is contained in:
parent
5ac4f4526c
commit
0c063f1650
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ class File(models.Model):
|
|||
get_name_sort(name, sortname)
|
||||
#add all files in one folder to same item
|
||||
if self.instances.all().count():
|
||||
folder = os.path.dirname(self.instances.all()[0].path)
|
||||
folder = os.path.dirname(self.instances.all()[0].path) + '/'
|
||||
qs = item.models.Item.objects.filter(files__instances__path__startswith=folder)
|
||||
if qs.exists():
|
||||
self.item = qs[0]
|
||||
|
|
Loading…
Reference in a new issue