]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/web-cmd.py
ftp: fix ls arguments for python3
[bup.git] / lib / cmd / web-cmd.py
index 8c084c17b771d64585805ad81013e5817ad564d1..6ef2fe9578420418f90d2d078d7f309b69dc84c6 100755 (executable)
@@ -9,7 +9,7 @@ for arg in "$@"; do
     arg_i=$((arg_i + 1))
 done
 # Here to end of preamble replaced during install
-bup_python="$(dirname "$0")/bup-python" || exit $?
+bup_python="$(dirname "$0")/../../config/bin/python" || exit $?
 exec "$bup_python" "$0"
 """
 # end of bup preamble
@@ -19,6 +19,8 @@ from collections import namedtuple
 import mimetypes, os, posixpath, signal, stat, sys, time, urllib, webbrowser
 from binascii import hexlify
 
+sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+
 from bup import compat, options, git, vfs
 from bup.helpers import (chunkyreader, debug1, format_filesize, handle_ctrl_c,
                          log, saved_errors)
@@ -116,8 +118,7 @@ def _dir_contents(repo, resolution, show_hidden=False):
             parent_item = resolution[-2][1] if len(resolution) > 1 else dir_item
             yield display_info(b'..', parent_item, parent_item, b'..')
             continue
-        res = vfs.try_resolve(repo, name, parent=resolution, want_meta=False)
-        res_name, res_item = res[-1]
+        res_item = vfs.ensure_item_has_metadata(repo, item, include_size=True)
         yield display_info(name, item, res_item)