fix error on open setings with add profile_name
This commit is contained in:
@@ -275,8 +275,17 @@ class AdvancedSettingsFrame(ttk.Frame):
|
||||
"Key file status unknown (no destination set).")
|
||||
return
|
||||
|
||||
# Determine the profile_name based on the current source folder
|
||||
source_name = self.app_instance.left_canvas_data.get('folder')
|
||||
if not source_name:
|
||||
# Fallback or handle case where no source is selected, perhaps default to "system" or log an error
|
||||
# For now, let's assume "system" if no specific folder is selected for keyfile status
|
||||
profile_name = "system"
|
||||
else:
|
||||
profile_name = "system" if source_name == "Computer" else source_name
|
||||
|
||||
key_file_path = self.app_instance.backup_manager.encryption_manager.get_key_file_path(
|
||||
self.app_instance.destination_path)
|
||||
self.app_instance.destination_path, profile_name)
|
||||
if os.path.exists(key_file_path):
|
||||
self.key_file_status_var.set(f"Key file exists: {key_file_path}")
|
||||
else:
|
||||
|
Reference in New Issue
Block a user