mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Don't replace spaces with underscores in linux device mount points
This commit is contained in:
parent
6c0b18461c
commit
60fb76aca1
@ -422,14 +422,13 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
if label is None:
|
if label is None:
|
||||||
label = self.STORAGE_CARD_VOLUME_LABEL + ' 2'
|
label = self.STORAGE_CARD_VOLUME_LABEL + ' 2'
|
||||||
extra = 0
|
extra = 0
|
||||||
label = label.replace(' ', '_')
|
|
||||||
while True:
|
while True:
|
||||||
q = '_(%d)'%extra if extra else ''
|
q = '_(%d)'%extra if extra else ''
|
||||||
if not os.path.exists('/media/'+label+q):
|
if not os.path.exists('/media/'+label+q):
|
||||||
break
|
break
|
||||||
extra += 1
|
extra += 1
|
||||||
if extra:
|
if extra:
|
||||||
label += '_(%d)'%extra
|
label += ' (%d)'%extra
|
||||||
|
|
||||||
def do_mount(node, label):
|
def do_mount(node, label):
|
||||||
cmd = ['pmount', '-w', '-s']
|
cmd = ['pmount', '-w', '-s']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user