[kupfer: 22/53] core.commands: Use bytestrings for filenames
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer: 22/53] core.commands: Use bytestrings for filenames
- Date: Thu, 24 Mar 2011 16:32:24 +0000 (UTC)
commit 67ea37875c9529dd5b1a54c209f48a31968986c7
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Thu Mar 24 17:22:35 2011 +0100
core.commands: Use bytestrings for filenames
kupfer/plugin/core/commands.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/core/commands.py b/kupfer/plugin/core/commands.py
index 5026fd7..0542d16 100644
--- a/kupfer/plugin/core/commands.py
+++ b/kupfer/plugin/core/commands.py
@@ -4,6 +4,7 @@ import os
from kupfer.objects import Action, FileLeaf, TextLeaf, TextSource
from kupfer.obj.compose import ComposedLeaf
+from kupfer import kupferstring
from kupfer.core import execfile
@@ -15,9 +16,10 @@ class SaveToFile (Action):
return True
def activate(self, obj, iobj):
- execfile.save_to_file(obj, iobj.object)
+ filepath = kupferstring.tolocale(iobj.object)
+ execfile.save_to_file(obj, filepath)
execfile.update_icon(obj, iobj.object)
- return FileLeaf(os.path.abspath(iobj.object))
+ return FileLeaf(os.path.abspath(filepath))
def item_types(self):
yield ComposedLeaf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]