CO - Bug fix with empty records (not allowed)

community
Gogs 7 years ago
parent ad2c911c0a
commit a453d9d2aa

@ -194,8 +194,10 @@ class Folders(Actor):
@pre : isValid
"""
folder = item['label']
signature='-'.join([str(item['date']),str(item['count']),'-files'])
tarball=os.sep([folder,signature])
name = folder.split(os.sep)
name = name[len(name)-1]
signature='-'.join([name,str(item['date']),str(item['count']),'files'])
tarball=os.sep.join([folder,'..',signature])
shutil.make_archive(tarball,'tar',folder)
self.clean(item)
#
@ -212,7 +214,7 @@ class Folders(Actor):
rpath = item['label']
files = os.listdir(item['label'])
for name in list(files) :
path = os.sep([item['label'],name])
path = os.sep.join([item['label'],name])
if os.path.isdir(path) :
shutil.rmtree(path)
else:

@ -230,6 +230,8 @@ class Manager() :
else:
#label = id
row = data
if type(row)==list and len(row) == 0 :
continue
#
#

Loading…
Cancel
Save