Skip to content

Commit

Permalink
fixed newfile creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jodus-Melodus committed Jul 26, 2024
1 parent 092595c commit 5fde17e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions phIDE.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,13 +1262,11 @@ def new_file(self, _=None) -> None:
path = ctk.filedialog.asksaveasfilename(
title="Save As", filetypes=[("Phi File", "*.phi"), ("All Files", "*.*")])

if os.path.exists(path):
self.current_path = path

with open(self.current_path, "w") as f:
f.write("")
self.current_path = path
with open(self.current_path, "w") as f:
f.write("")

self.add_tab(self.current_path)
self.add_tab(self.current_path)


if __name__ == "__main__":
Expand Down

0 comments on commit 5fde17e

Please sign in to comment.