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