Skip to content

Commit 9259014

Browse files
committed
拖拽也能在linux上工作
1 parent f92fb29 commit 9259014

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import sys
1+
import sys, os
22
# from PySide6.QtGui import *
33
from PySide6.QtWidgets import QApplication
44
# from PySide6.QtCore import *
@@ -42,7 +42,10 @@ def fu_k(e):
4242
ans = ''
4343
for aa in e.mimeData().text().split('\n'):
4444
if aa != '':
45-
ans += aa[8:] + ','
45+
if os.name == 'nt':
46+
ans += aa[8:] + ','
47+
else:
48+
ans += aa[7:] + ','
4649

4750
fun_bind.files = ans
4851
fun_bind.a3.start()

0 commit comments

Comments
 (0)