Skip to content

Commit 5717972

Browse files
committed
bugfix: cannot open image with UNC path
1 parent 04d5533 commit 5717972

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def openfile(self):
5454

5555

5656
def double_click_search_table(self, info):
57-
row = info.row()
58-
os.startfile(self.resultTable.item(row, 0).text())
57+
file_path = self.resultTable.item(info.row(), 0).text()
58+
os.startfile(os.path.normpath(file_path))
5959

6060

6161
def double_click_duplicate_table(self, info):
@@ -74,6 +74,7 @@ def start_search(self):
7474
return
7575
self.resultTable.setRowCount(0) # 清空表格
7676
nc = self.resultCount.value()
77+
nc = nc if nc <= len(self.exists_index) else len(self.exists_index)
7778
results = utils.checkout(self.input_path[0], self.exists_index, nc)
7879
for i in results:
7980
row = self.resultTable.rowCount()

0 commit comments

Comments
 (0)