Browse Source

overwrite file on save instead of saving copy

Daniel Sheffield 2 years ago
parent
commit
4d6b066413
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/activities/RecipeEditor.py
  2. 1 1
      recipe.py

+ 1 - 1
app/activities/RecipeEditor.py

@@ -288,7 +288,7 @@ class RecipeEditor(FocusWidget):
         fname = self.fname.get_edit_text()
         fname = self.fname.get_edit_text()
         if not fname:
         if not fname:
             return
             return
-        with open(f'{fname}-modified.yaml', 'w') as f:
+        with open(fname, 'w') as f:
             yaml.dump(yml, f)
             yaml.dump(yml, f)
 
 
 
 

+ 1 - 1
recipe.py

@@ -72,7 +72,7 @@ with open(fname) as f:
 activity_manager.create(RecipeEditor,
 activity_manager.create(RecipeEditor,
     'recipe_editor',
     'recipe_editor',
     activity_manager, query_manager,
     activity_manager, query_manager,
-    fname.rsplit('.', 1)[0], recipe,
+    fname, recipe,
 )
 )
 
 
 app = Recipe(activity_manager)
 app = Recipe(activity_manager)