From: DongHun Kwak Date: Wed, 27 Sep 2017 00:58:01 +0000 (+0900) Subject: Bump to file 5.32 X-Git-Tag: submit/tizen_base/20171019.012745^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c22f5201e3afd800fb65454969e6cf770cf348f;p=platform%2Fupstream%2Ffile.git Bump to file 5.32 [Model] All [BinType] AP [Customer] OPEN [Issue#] N/A [Request] N/A [Occurrence Version] N/A [Problem] version upgrade [Cause & Measure] version upgrade [Checking Method] N/A [Team] Open Source Management and Setting Part [Developer] dh0128.kwak [Solution company] Samsung [Change Type] N/A Change-Id: I94afd4017d131a749213de7822e17b063229302c Signed-off-by: DongHun Kwak Signed-off-by: MyoungJune Park --- diff --git a/packaging/file.spec b/packaging/file.spec index 767a833..2c6aaf7 100644 --- a/packaging/file.spec +++ b/packaging/file.spec @@ -5,7 +5,7 @@ BuildRequires: findutils BuildRequires: libtool BuildRequires: zlib-devel Url: http://www.darwinsys.com/file/ -Version: 5.31 +Version: 5.32 Release: 0 Summary: A Tool to Determine File Types License: BSD-2.0 diff --git a/python/magic.py b/python/magic.py index b66005b..662569e 100644 --- a/python/magic.py +++ b/python/magic.py @@ -145,18 +145,7 @@ class Magic(object): as a filename or None if an error occurred and the MAGIC_ERROR flag is set. A call to errno() will return the numeric error code. """ - if isinstance(filename, bytes): - bi = filename - else: - try: # keep Python 2 compatibility - bi = bytes(filename, 'utf-8') - except TypeError: - bi = bytes(filename) - r = _file(self._magic_t, bi) - if isinstance(r, str): - return r - else: - return str(r).encode('utf-8') + return Magic.__tostr(_file(self._magic_t, Magic.__tobytes(filename))) def descriptor(self, fd): """ diff --git a/src/compress.c b/src/compress.c index c6e6f0e..2f789cd 100644 --- a/src/compress.c +++ b/src/compress.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.97 2016/05/13 23:02:28 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.105 2017/05/25 00:13:03 christos Exp $") #endif #include "magic.h" diff --git a/src/readcdf.c b/src/readcdf.c index b4bb784..80c8d26 100644 --- a/src/readcdf.c +++ b/src/readcdf.c @@ -26,7 +26,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readcdf.c,v 1.56 2016/03/03 22:20:03 christos Exp $") +FILE_RCSID("@(#)$File: readcdf.c,v 1.65 2017/04/08 20:58:03 christos Exp $") #endif #include