diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-13 23:07:46 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-16 11:53:16 +0000 |
commit | d256ad12c3dca5269626158d64c73e07a44f0ec9 (patch) | |
tree | 3022a203aed4ffd6e0f96cd107f6b52437ef9136 | |
parent | bc84550e3ad3dd0f032d435415804bf9765b2f0f (diff) |
3rdparty/t9write: unpack.py: Allow duplicate file names
This change allows the rules with same input file name (but
with different directory prefix) to co-exist. It works by
removing the already matched input file from the "zip list".
However, this only works if the rules are ordered correctly,
i.e. the most exact ones being first in the list.
Consider the following example:
'data/arabic': [
'*/Arabic/_databas_le.bin',
],
'data': [
'*/_databas_le.bin',
]
Without this change the later rule will override the
file entry already copied for 'data/arabic'. But with
'Arabic/_databas_le.bin' removed from the input list, it
will not be matched.
Change-Id: Ifd06125d1519c45dba077e50f69769fdb0070351
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/virtualkeyboard/3rdparty/t9write/unpack.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/virtualkeyboard/3rdparty/t9write/unpack.py b/src/virtualkeyboard/3rdparty/t9write/unpack.py index 1eb15c76..77bcbe1b 100644 --- a/src/virtualkeyboard/3rdparty/t9write/unpack.py +++ b/src/virtualkeyboard/3rdparty/t9write/unpack.py @@ -234,6 +234,7 @@ def unpack(zip_list, zip_dir, out_dir): dst = os.path.join(dst_dir, os.path.basename(zip_name)).replace('\\', '/') print(zip_name + ' -> ' + dst) shutil.copy2(src, dst) + zip_list.remove(zip_name) if __name__ == '__main__': if len(sys.argv) != 3: |