Skip to content

Commit 9b1e88b

Browse files
committed
version 1.10.1
fix database self crc with --posix on windows
1 parent a15800a commit 9b1e88b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

backupy/filescanner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def getSets(self) -> tuple:
8282
def saveDatabase(self, db_name: str = "database.json") -> None:
8383
"""Write database to config_dir on self and other if enabled"""
8484
self_entry = os.path.join(self.config_dir, "database")
85+
if self.force_posix_path_sep:
86+
self_entry = self_entry.replace(os.path.sep, "/")
8587
self_crc = self.calcDatabaseCrc(self.dict_current)
8688
assert self_entry not in self.dict_current
8789
self.dict_current[self_entry] = {"size": 0, "mtime": 0, "crc": self_crc, "dir": False}
@@ -119,6 +121,8 @@ def calcDatabaseCrc(self, database: dict) -> str:
119121
def verifyDatabaseCrc(self, database: dict, abs_db_path: str) -> None:
120122
"""Verify the data in the database matches the CRC and pops the entry, otherwise raises exception"""
121123
self_entry = os.path.join(self.config_dir, "database")
124+
if self.force_posix_path_sep:
125+
self_entry = self_entry.replace(os.path.sep, "/")
122126
if self_entry in database:
123127
crc_record = database.pop(self_entry)["crc"]
124128
crc_calc = self.calcDatabaseCrc(database)

backupy/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
def getVersion() -> str:
24-
return "1.10.0"
24+
return "1.10.1"
2525

2626

2727
def getString(text: str) -> str:

0 commit comments

Comments
 (0)