Merge pull request #9253 from Security-Onion-Solutions/TOoSmOotH-patch-2

Use shutil in case there are multiple filesystems involved.
This commit is contained in:
Mike Reeves
2022-11-30 11:04:30 -05:00
committed by GitHub

View File

@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os import os
import shutil
import time import time
import hashlib import hashlib
import logging import logging
@@ -61,7 +62,7 @@ def process(filename, hizash):
head, tail = os.path.split(filename) head, tail = os.path.split(filename)
# Move the file # Move the file
os.rename(filename, strelkapath + tail) shutil.move(filename, strelkapath + tail)
class CreatedEventHandler(FileSystemEventHandler): class CreatedEventHandler(FileSystemEventHandler):
def on_created(self, event): def on_created(self, event):