diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-20 10:36:43 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-20 10:36:43 (GMT) |
commit | e0d3c350c916c126dd3929a3a02973fb921b6431 (patch) | |
tree | 9a0cbdfd8c0e6e87318f2b636917ff688496b6fe /services/shell/clipboardobject.py | |
parent | a0195e7fd4263bbf0070b6383b58d0ee613e362f (diff) | |
parent | fff0daf8c4aef388f12f801162a050f13acd6cb8 (diff) |
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Diffstat (limited to 'services/shell/clipboardobject.py')
-rw-r--r-- | services/shell/clipboardobject.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/shell/clipboardobject.py b/services/shell/clipboardobject.py index 65f3bc5..c3cdab3 100644 --- a/services/shell/clipboardobject.py +++ b/services/shell/clipboardobject.py @@ -101,8 +101,11 @@ class ClipboardObject: if len(uris) == 1 or not uris[1]: uri = urlparse.urlparse(uris[0], 'file') if uri.scheme == 'file': - logging.debug('Choosed %r!' % mime.get_for_file(uri.path)) - format = mime.get_for_file(uri.path) + if os.path.exists(uri.path): + format = mime.get_for_file(uri.path) + else: + format = mime.get_from_file_name(uri.path) + logging.debug('Choosed %r!' % format) return format |