[game-data-packager] 07/17: When unpacking tarballs or zip files, coerce names to lower-case

Simon McVittie smcv at debian.org
Fri Jan 2 21:11:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit 9fe53091cf1c4048b82abf259b2fb5f6bfdf7564
Author: Simon McVittie <smcv at debian.org>
Date:   Fri Jan 2 18:59:24 2015 +0000

    When unpacking tarballs or zip files, coerce names to lower-case
    
    We always use lower-case entries in look_for, to avoid case-sensitivity.
---
 lib/game_data_packager/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 5ad5d34..3f3aa2c 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -536,7 +536,7 @@ class GameDataPackage(object):
                 if wanted.size is not None and wanted.size != entry.file_size:
                     continue
 
-                match_path = '/' + entry.filename
+                match_path = '/' + entry.filename.lower()
 
                 for lf in wanted.look_for:
                     if match_path.endswith('/' + lf):
@@ -590,7 +590,7 @@ class GameDataPackage(object):
                 if wanted.size is not None and wanted.size != entry.size:
                     continue
 
-                match_path = '/' + entry.name
+                match_path = '/' + entry.name.lower()
 
                 for lf in wanted.look_for:
                     if match_path.endswith('/' + lf):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list