|
|
|
@ -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:
|
|
|
|
|