Overwrite existing filename in csv export

This commit is contained in:
cevoj35548 2023-06-05 20:03:39 -05:00
parent dcdaceac86
commit f79cba46d0

View file

@ -276,6 +276,9 @@ class UI(QMainWindow):
if not file_dialog.exec_():
return
file_path = file_dialog.selectedFiles()[0]
# remove file if it already exists
if os.path.exists(file_path):
os.remove(file_path)
links = self.searchText(self.inputBox.toPlainText())
try:
with open(file_path, 'w', newline='') as csvfile: