]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/path.py
bup-save bup.drecurse bup.hlinkdb bup.path: accommodate python 3
[bup.git] / lib / bup / path.py
index 7a4f31cde52d9981cbe5ca9392548010d60d0eb0..7dd3905a2ecf22196b333362c0d5e20cd22f455a 100644 (file)
@@ -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)