imgconverter: fix handling explicit file type
Fix handling source filename as 'type:path' - get parts, not try to extract only the first one. Related QubesOS/qubes-issues#3085
This commit is contained in:
parent
c57f28d8f7
commit
34e3c3acf3
@ -250,9 +250,8 @@ get_from_stream(), get_from_vm(), get_xdg_icon_from_vm(), get_through_dvm()'''
|
|||||||
'''Master end of image filter: writes untrusted image to stdout and
|
'''Master end of image filter: writes untrusted image to stdout and
|
||||||
expects header+RGBA on stdin. This method is invoked from qvm-imgconverter-client.'''
|
expects header+RGBA on stdin. This method is invoked from qvm-imgconverter-client.'''
|
||||||
|
|
||||||
filetype = None
|
|
||||||
if ':' in filename:
|
if ':' in filename:
|
||||||
filetype, filename = filename.split(':', 1)[0]
|
filetype, filename = filename.split(':', 1)
|
||||||
sys.stdout.write('{0}:-\n'.format(filetype))
|
sys.stdout.write('{0}:-\n'.format(filetype))
|
||||||
else:
|
else:
|
||||||
sys.stdout.write('-\n')
|
sys.stdout.write('-\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user