Clipboard fixes.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import logging
|
||||
import urlparse
|
||||
|
||||
import typeregistry
|
||||
|
||||
@@ -58,7 +59,8 @@ class Format:
|
||||
|
||||
def destroy(self):
|
||||
if self._on_disk:
|
||||
os.remove(self._data.replace('file://', ''))
|
||||
uri = urlparse.urlparse(self._data)
|
||||
os.remove(uri.path)
|
||||
|
||||
def get_type(self):
|
||||
return self._type
|
||||
|
||||
@@ -598,7 +598,6 @@ class UriListFileType(FileType):
|
||||
if len(uris) == 1:
|
||||
uri = urlparse.urlparse(uris[0])
|
||||
ext = posixpath.splitext(uri[2])[1]
|
||||
logging.debug(ext)
|
||||
# FIXME: Bad hack, the type registry should treat text/uri-list as a special case.
|
||||
if ext in ['.jpg', '.jpeg', '.gif', '.png', '.svg']:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user