We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb241ed commit 8b156b7Copy full SHA for 8b156b7
custom_components/battery_notes/library_updater.py
@@ -122,7 +122,12 @@ async def copy_schema(self):
122
install_schema_path = os.path.join(os.path.dirname(__file__), "schema.json")
123
storage_schema_path = self.hass.config.path(STORAGE_DIR, "battery_notes", "schema.json")
124
os.makedirs(os.path.dirname(storage_schema_path), exist_ok=True)
125
- shutil.copyfile(install_schema_path, storage_schema_path)
+ os.copy_file_range
126
+ await self.hass.async_add_executor_job(
127
+ shutil.copyfile,
128
+ install_schema_path,
129
+ storage_schema_path,
130
+ )
131
132
async def time_to_update_library(self, hours: int) -> bool:
133
"""Check when last updated and if OK to do a new library update."""
0 commit comments