Make redo read byte-strings from the database.
By default, the database redo uses to store file state returns filenames as Unicode strings, and if redo tries to run a build-script whose fully-qualified path contains non-ASCII characters then redo crashes when trying to promote the path to a Unicode string. This patch ensures that the database always returns byte-strings, not Unicode strings. That way, the fully-qualified path and the target name are both byte-strings and can be joined without issue. (Fixes a bug reported by Zoran Zaric.)
This commit is contained in:
parent
b43317bb83
commit
e27aaf01e7
4 changed files with 5 additions and 1 deletions
1
state.py
1
state.py
|
|
@ -15,6 +15,7 @@ def _connect(dbfile):
|
|||
_db = sqlite3.connect(dbfile, timeout=TIMEOUT)
|
||||
_db.execute("pragma synchronous = off")
|
||||
_db.execute("pragma journal_mode = PERSIST")
|
||||
_db.text_factory = str
|
||||
return _db
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue