From 5865ddd94d0374196c4ee904cc2a27f0d27f18a7 Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Mon, 10 Apr 2017 13:19:30 +0200 Subject: [PATCH] Make root paths abspaths * src_root_path and dst_root_path are now converted to abspaths when initializing kittengroomer to avoid any weird issues with relative or misformed paths --- kittengroomer/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kittengroomer/helpers.py b/kittengroomer/helpers.py index c7ff3a5..64e7e51 100644 --- a/kittengroomer/helpers.py +++ b/kittengroomer/helpers.py @@ -303,8 +303,8 @@ class KittenGroomerBase(object): def __init__(self, src_root_path, dst_root_path): """Initialized with path to source and dest directories.""" - self.src_root_path = src_root_path - self.dst_root_path = dst_root_path + self.src_root_path = os.path.abspath(src_root_path) + self.dst_root_path = os.path.abspath(dst_root_path) def safe_rmtree(self, directory_path): """Remove a directory tree if it exists."""