Ticket #2253: unicode.diff
| File unicode.diff, 0.9 kB (added by jun66j5, 1 year ago) |
|---|
-
wikirename/util.py
old new 1 1 #! /usr/bin/python 2 2 from trac.core import * 3 3 from trac.env import * 4 from trac.util.text import unicode_quote 4 5 5 6 import sys 6 7 import sre … … 68 69 if cursor.rowcount > 0: 69 70 # Change the directory where the attachments are stored, if there were any 70 71 debug('Moving all attachments on file system') 71 from_path = os.path.join(env.path, 'attachments', 'wiki', u rllib.quote(oldname))72 to_path = os.path.join(env.path, 'attachments', 'wiki', u rllib.quote(newname))72 from_path = os.path.join(env.path, 'attachments', 'wiki', unicode_quote(oldname)) 73 to_path = os.path.join(env.path, 'attachments', 'wiki', unicode_quote(newname)) 73 74 debug('Moving from %r to %r', from_path, to_path) 74 75 os.renames(from_path, to_path) 75 76
