Better support for non-ASCII filenames in Windows.
svn: r14382
This commit is contained in:
parent
b689456c34
commit
f97e6622e4
@ -28,6 +28,7 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import traceback
|
import traceback
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -580,7 +581,13 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
|||||||
gpr_files = set([os.path.split(os.path.join(const.USER_PLUGINS, name))[0]
|
gpr_files = set([os.path.split(os.path.join(const.USER_PLUGINS, name))[0]
|
||||||
for name in good_gpr])
|
for name in good_gpr])
|
||||||
for gpr_file in gpr_files:
|
for gpr_file in gpr_files:
|
||||||
callback(" " + (_("Registered '%s'") % gpr_file) + "\n")
|
# Convert gpr_file to unicode otherwise the callback will not
|
||||||
|
# work with non ASCII characters in filenames in Windows.
|
||||||
|
# But don't use converted filenames
|
||||||
|
# in the call to self.__pmgr.reg_plugins
|
||||||
|
# as that will break in reg_plugins.
|
||||||
|
u_gpr_file = unicode(gpr_file, sys.getfilesystemencoding())
|
||||||
|
callback(" " + (_("Registered '%s'") % u_gpr_file) + "\n")
|
||||||
self.__pmgr.reg_plugins(gpr_file)
|
self.__pmgr.reg_plugins(gpr_file)
|
||||||
|
|
||||||
file_obj.close()
|
file_obj.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user