hrrmsn / ffcleaner

cmd tool to cleanup littered directories (Files&Folders cleaner)
0 stars 0 forks source link

Do not delete log file if email wasn't sent #32

Closed hrrmsn closed 7 years ago

hrrmsn commented 7 years ago

I mean a following case.

86% complete
100% complete
Error when cleaning directory: '../ffcleaner-sandbox/textfiles'.
Traceback (most recent call last):
  File "E:\!Plan9\dev\languages\python\ffcleaner\ffcleaner.py", line 471, in main
    plungedir(cleandir, todir, cleandir_files_number, ext_to_filetype, {}, unknown_exts)
  File "E:\!Plan9\dev\languages\python\ffcleaner\ffcleaner.py", line 212, in plungedir
    cleanfile(fullpath, todir, ftype, filenames_storage)
  File "E:\!Plan9\dev\languages\python\ffcleaner\ffcleaner.py", line 181, in cleanfile
    shutil.copy2(filepath, fulldest)
  File "E:\Program Files\Python27\lib\shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "E:\Program Files\Python27\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: '../ffcleaner-sandbox/textfiles\\JavaScript(2005).pdf'

Creating archive with the log file...
Archive was created successfully.
Sending archive via email...
Warning: some problems with internet connection. Email wasn't sent.
Removing log file...
Removed successfully.
hrrmsn commented 7 years ago

It seems like i fixed this issue. But i think that i need more testing. So i could close this ticket later (after more detailed testing).

hrrmsn commented 7 years ago

DONE.