diff --git a/app/app_controller.py b/app/app_controller.py index f81bab6..8426607 100644 --- a/app/app_controller.py +++ b/app/app_controller.py @@ -1,4 +1,3 @@ -from app.directory_manager import DirectoryManager from app.file_factory import FileFactory from app.file_gateway import FileGateway from app.scanner import Scanner @@ -10,7 +9,6 @@ class AppController: def __init__(self, destination_directory, source_directory): - DirectoryManager().check_if_directory_exists(source_directory) self.source_directory = source_directory self.destination_directory = destination_directory diff --git a/main.py b/main.py index 700982f..5f405d2 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ from app.app_controller import AppController from app.db_initializer import DBInitializer +from app.directory_manager import DirectoryManager from app.extension_scanner import ExtensionScanner from app.logger import Logger @@ -21,8 +22,11 @@ DBInitializer().init_prod_database() if args.extensions: + DirectoryManager().check_if_directory_exists(args.source) ExtensionScanner(args.source).display_invalid_extensions() elif args.destination: + DirectoryManager().check_if_directory_exists(args.source) + DirectoryManager().check_if_directory_exists(args.destination) Logger().init_log_file(args.destination) AppController(destination_directory=args.destination, source_directory=args.source).copy_files_from_source_to_destination()