Skip to content

Commit

Permalink
Added logs for analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
swetayadav1 committed Aug 14, 2023
1 parent f94abb6 commit 686113f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nxdrive/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def _create_db_backup_worker(self) -> None:
if self.db_backup_worker:
self.started.connect(self.db_backup_worker.thread.start)

@if_frozen
# @if_frozen
def _create_extension_listener(self) -> None:
self._extension_listener = self.osi.get_extension_listener()
if not self._extension_listener:
Expand Down
2 changes: 1 addition & 1 deletion nxdrive/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class MetaOptions(type):
"ignored_prefixes": (__prefixes, "default"),
"ignored_suffixes": (__suffixes, "default"),
"is_alpha": (_IS_ALPHA, "default"),
"is_frozen": (_IS_FROZEN, "default"),
"is_frozen": (True, "default"),
"light_icons": (False, "default"),
"locale": ("en", "default"),
"log_level_console": (DEFAULT_LOG_LEVEL_CONSOLE, "default"),
Expand Down
3 changes: 3 additions & 0 deletions nxdrive/osi/windows/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ def disable_overlay() -> None:

def set_filter_folders(paths: Set[Path], /) -> None:
filters = json.dumps([str(path) for path in paths])
log.info(f">>> set_filter_folders: {filters}")
registry.write(OVERLAYS_REGISTRY_KEY, {FILTER_FOLDERS: filters})


def refresh_files(paths: List[Path], /) -> None:

for path in paths:
log.info(">>>> refresh_files: {path}")
update_explorer(path)


Expand Down
3 changes: 2 additions & 1 deletion nxdrive/osi/windows/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def init(self) -> None:
}
if watched_folders:
set_filter_folders(watched_folders)
log.info(">>> Enable icon overlays")
enable_overlay()

@if_frozen
Expand Down Expand Up @@ -163,7 +164,7 @@ def register_contextual_menu_entry(
f'"{sys.executable}" {command}',
)

@if_frozen
# @if_frozen
def unregister_contextual_menu(self) -> None:
log.info("Unregistering contextual menu")

Expand Down
4 changes: 2 additions & 2 deletions nxdrive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ def if_frozen(func, /) -> Callable: # type: ignore
def wrapper(*args: Any, **kwargs: Any) -> Union[bool, Callable]:
"""Inner function to do the check and abort the call
if the application not frozen."""
if not Options.is_frozen:
return False
# if not Options.is_frozen:
# return False
return func(*args, **kwargs) # type: ignore

return wrapper
Expand Down

0 comments on commit 686113f

Please sign in to comment.