Skip to content

Commit

Permalink
dir will stay in place if no directory selected
Browse files Browse the repository at this point in the history
  • Loading branch information
molofgarb committed Apr 16, 2022
1 parent 539b573 commit c66cb84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ytdlGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ def downloadURLs(self, URLs):
#uses tkinter's askdirectory dialog to set directory in text box
def setDirectory(self):
dir = filedialog.askdirectory()
self.directoryText.delete("1.0", tk.END)
self.directoryText.insert(tk.END, dir)
if (dir != ""):
self.directoryText.delete("1.0", tk.END)
self.directoryText.insert(tk.END, dir)

#updates directory field with directory in text box
def saveDirectory(self):
Expand Down

0 comments on commit c66cb84

Please sign in to comment.