X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fbup%2Fpath.py;h=7dd3905a2ecf22196b333362c0d5e20cd22f455a;hb=f0a4b3b6ef7d00e64b04dee51b8e15db71b693d3;hp=7a4f31cde52d9981cbe5ca9392548010d60d0eb0;hpb=3c64b5788c3e6b10528a81285b71da2edbed8950;p=bup.git diff --git a/lib/bup/path.py b/lib/bup/path.py index 7a4f31c..7dd3905 100644 --- a/lib/bup/path.py +++ b/lib/bup/path.py @@ -6,9 +6,10 @@ import os # Eventually, if we physically move the source tree cmd/ to lib/, then # we could use realpath here and save some stats... -_libdir = os.path.abspath(os.path.dirname(__file__) + '/..') -_exedir = os.path.abspath(_libdir + '/cmd') -_exe = os.path.join(_exedir, 'bup') +_libdir = os.path.abspath(os.path.dirname(__file__.encode('iso-8859-1')) + b'/..') +_resdir = _libdir +_exedir = os.path.abspath(_libdir + b'/cmd') +_exe = os.path.join(_exedir, b'bup') def exe(): @@ -21,3 +22,6 @@ cmddir = exedir def libdir(): return _libdir + +def resource_path(subdir=b''): + return os.path.join(_resdir, subdir)