Skip to content

Commit

Permalink
path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Muddyblack committed Jan 12, 2024
1 parent 7288d38 commit f0128a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion file_manager/drive_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def connect_to_drive(access_file):


if __name__ == "__main__":
DRIVE = connect_to_drive("./app_data/raspi.json")
DRIVE = connect_to_drive("../app_data/raspi.json")
print(DRIVE)
8 changes: 5 additions & 3 deletions file_manager/drive_local_file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@


current_file_directory = os.path.dirname(os.path.realpath(__file__))
project_dir = os.path.dirname(current_file_directory)

# Load the configuration from the config.json file
with open(f"{current_file_directory}/app_config.json", encoding="utf-8") as config_file:
with open(f"{project_dir}/app_config.json", encoding="utf-8") as config_file:
config = json.load(config_file)

# Constants
TARGET_DIR = config["TARGET_DIR"]
CURRENT_FILES_FILE = f"{current_file_directory}/app_data/current_files.json"
CHANGES_STATE_FILE = f"{current_file_directory}/app_data/changes_state.json"
CURRENT_FILES_FILE = f"{project_dir}/app_data/current_files.json"
CHANGES_STATE_FILE = f"{project_dir}/app_data/changes_state.json"
USE_GDRIVE = config["USE_GDRIVE"]
GOOGLE_API_ACCESS = config["GOOGLE_API_ACCESS"]
DRIVE_DIR_ID = config["DRIVE_DIR_ID"]
Expand Down
4 changes: 2 additions & 2 deletions file_manager/show_file_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from datetime import datetime
from pathlib import Path

#pylint: disable=wrong-import-position
# pylint: disable=wrong-import-position
PARENT_DIRECTORY_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(PARENT_DIRECTORY_PATH)
from MetaDataEditor.image_metadata_handler import read_metadata
Expand Down Expand Up @@ -99,5 +99,5 @@ def check_for_event(file):

if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
TEST = check_for_event("./app_data/content/[email protected]")
TEST = check_for_event("../app_data/content/[email protected]")
print(f"{TEST}")

0 comments on commit f0128a9

Please sign in to comment.