changeset 93:900014ae36b8

fixed unicode issue invalid method call in files_management
author Goffi <goffi@goffi.org>
date Mon, 08 Sep 2014 15:42:25 +0200
parents fdd0543677d4
children 66b65ed9baf2
files urwid_satext/files_management.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/urwid_satext/files_management.py	Mon Sep 08 15:42:25 2014 +0200
+++ b/urwid_satext/files_management.py	Mon Sep 08 15:42:25 2014 +0200
@@ -91,6 +91,7 @@
             return self._w.keypress(size, key)
 
     def showDirectory(self, path):
+        path = path.encode('utf-8')
         self.path = path
         del self.files_list[:]
         directories = []
@@ -233,13 +234,13 @@
     def onPreviousDir(self, wid):
         path = os.path.abspath(self.path_wid.get_edit_text())
         if not os.path.isdir(path):
-            path = dirname(path)
+            path = os.path.dirname(path)
         self.path_wid.set_edit_text(os.path.split(path)[0])
 
     def onDirClick(self, wid):
         path = os.path.abspath(self.path_wid.get_edit_text())
         if not os.path.isdir(path):
-            path = dirname(path)
+            path = os.path.dirname(path)
         self.path_wid.set_edit_text(os.path.join(path,wid.get_text()))
 
     def onFileClick(self, wid):