Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path fix #38

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}")
Loading