Skip to content

Commit 3302f10

Browse files
committed
拖拽能在linux的非中文路径工作
1 parent 0d27e9c commit 3302f10

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

main.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@
4141

4242

4343
def fu_k(e):
44-
print(e.mimeData().text())
44+
print(repr(e.mimeData().text()))
4545
ans = ''
46-
for aa in e.mimeData().text().split('\n'):
47-
if aa != '':
48-
if os.name == 'nt':
46+
if os.name == 'nt':
47+
for aa in e.mimeData().text().split('\n'):
48+
if aa != '':
4949
ans += aa[8:] + ','
50-
else:
50+
else:
51+
for aa in e.mimeData().text().split('\r\n'):
52+
if aa != '':
5153
ans += aa[7:] + ','
5254

5355
fun_bind.files = ans

0 commit comments

Comments
 (0)