diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hooks/AntiVirus.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/module/plugins/hooks/AntiVirus.py b/module/plugins/hooks/AntiVirus.py index 4bb2396d9..c5d6b8321 100644 --- a/module/plugins/hooks/AntiVirus.py +++ b/module/plugins/hooks/AntiVirus.py @@ -1,6 +1,7 @@  # -*- coding: utf-8 -*-  import os +import shutil  import subprocess  from module.plugins.Hook import Hook, Expose, threaded @@ -10,7 +11,7 @@ from module.utils import fs_encode, save_join  class AntiVirus(Hook):      __name__    = "AntiVirus"      __type__    = "hook" -    __version__ = "0.01" +    __version__ = "0.02"      __config__ = [("action"    , "Antivirus default;Delete;Quarantine", "Manage infected files"                    , "Antivirus default"),                    ("quarpath"  , "folder"                             , "Quarantine folder"                        , ""                 ), @@ -62,9 +63,9 @@ class AntiVirus(Hook):                      elif action == "Quarantine":                          new_filename = save_join(self.getConfig('quarpath'), name) -                        os.rename(filename, new_filename) +                        shutil.move(filename, new_filename) -                except IOError, e: +                except (IOError, shutil.Error), e:                      self.logError(name, action + " action failed!", e)              elif not out: | 
