Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Commit c441e3e

Browse files
authored
Fixed a program-breaking bug. It should work now.
1 parent 1e6ed10 commit c441e3e

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Rails.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ def CoreCalculation():
8484
global FolderPath
8585

8686
#Read DefaultPath and save it as FilePath
87-
with open("DefaultPath.txt", "r") as Path:
88-
FolderPath = Path.read()
87+
FolderPath = top.PathEntry
88+
if (FolderPath == ""):
89+
with open("DefaultPath.txt", "r") as Path:
90+
FolderPath = Path.read()
8991
#Find new HashID
9092
HighestHashID = 0
9193
for i in os.listdir(FolderPath):
@@ -307,11 +309,12 @@ def RemovePoint():
307309
top = Toplevel1 (root)
308310

309311
def EnterPath():
310-
global FilePath
312+
global FolderPath
311313

312314
with open("DefaultPath.txt", "r") as Path:
313-
FilePath = Path.read()
314-
top.PathEntry = filedialog.askopenfilename(initialdir=FilePath, title="Select File to Modify")
315+
FolderPath = Path.read()
316+
#top.PathEntry = filedialog.askopenfilename(initialdir=FilePath, title="Select File to Modify")
317+
top.PathEntry = filedialog.askdirectory()
315318
#top.PathEntry.place(relx=0.225, rely=--0.65, relheight=0.047, relwidth=0.165)
316319

317320

0 commit comments

Comments
 (0)