fix quote for real

This commit is contained in:
chrys 2017-09-12 02:21:06 +02:00
parent 8a3a3108c9
commit 2b3c1a1728

View File

@ -39,7 +39,7 @@ class command():
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True) self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return return
for display in range(10): for display in range(10):
p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + self.env['commandBuffer']['clipboard'][currClipboard] +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True) p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + self.env['commandBuffer']['clipboard'][currClipboard].replace('"','\\\\\\"') +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
self.env['runtime']['outputManager'].interruptOutput() self.env['runtime']['outputManager'].interruptOutput()
#screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding') #screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding')
@ -52,7 +52,7 @@ class command():
if stderr != '': if stderr != '':
self.env['runtime']['outputManager'].presentText(stderr , soundIcon='', interrupt=False) self.env['runtime']['outputManager'].presentText(stderr , soundIcon='', interrupt=False)
else: else:
self.env['runtime']['outputManager'].presentText('pasted to the X session or clipboard.', interrupt=True) self.env['runtime']['outputManager'].presentText('exported to the X session.', interrupt=True)
except Exception as e: except Exception as e:
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False) self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)