Browse Source

tiny simplification

Falko Schindler 1 year ago
parent
commit
b94622c248
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nicegui/storage.py

+ 1 - 1
nicegui/storage.py

@@ -155,7 +155,7 @@ class Storage:
         To distinguish between the old and new encoding, the new files are named with dashes instead of underscores.
         """
         for filepath in self.path.glob('storage_*.json'):
-            new_filepath = filepath.with_name(filepath.stem.replace('_', '-') + filepath.suffix)
+            new_filepath = filepath.with_name(filepath.name.replace('_', '-'))
             try:
                 data = json.loads(filepath.read_text())
             except Exception: