Skip to content

Commit

Permalink
Improve layer.is_localized_path() logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Feb 11, 2024
1 parent 7d49f26 commit e20ff5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libqfieldsync/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,11 @@ def is_localized_path(self) -> bool:
# on QFieldCloud localized layers will be invalid and therefore we get the layer source from `bad_layer_handler`
source = bad_layer_handler.invalid_layer_sources_by_id.get(self.layer.id())
if source:
return source.startswith("localized:")
return (
source.startswith("localized:")
or source.startswith("file:localized:")
or "url=file:localized:" in source
)

path_resolver = self.project.pathResolver()
path = path_resolver.writePath(self.metadata.get("path", ""))
Expand Down

0 comments on commit e20ff5b

Please sign in to comment.