From ac1562f4eadaa574100fc044c3671efc049bbfb0 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Thu, 17 Apr 2014 20:49:01 +0200 Subject: [PATCH] Fix open_cmd and misleading example from testrepo. Open command was not using system_path to ensure user expansion. Testrepo was using pubsdir:// instead of docsdir://. Although not directly used in test this was misleading and incoherent. Also fixes missing system_path in filebroker. --- pubs/commands/open_cmd.py | 4 ++-- tests/testrepo/meta/Page99.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubs/commands/open_cmd.py b/pubs/commands/open_cmd.py index 3807cb2..ccbc040 100644 --- a/pubs/commands/open_cmd.py +++ b/pubs/commands/open_cmd.py @@ -4,7 +4,7 @@ from .. import repo from ..configs import config from ..uis import get_ui from .. import color -#from .helpers import add_references_argument, parse_reference +from ..content import system_path def parser(subparsers): @@ -34,7 +34,7 @@ def command(args): ui.exit() try: - docpath = rp.databroker.real_docpath(paper.docpath) + docpath = system_path(rp.databroker.real_docpath(paper.docpath)) cmd = with_command.split() cmd.append(docpath) subprocess.Popen(cmd) diff --git a/tests/testrepo/meta/Page99.yaml b/tests/testrepo/meta/Page99.yaml index 44a426c..2c24eca 100644 --- a/tests/testrepo/meta/Page99.yaml +++ b/tests/testrepo/meta/Page99.yaml @@ -1,3 +1,3 @@ -docfile: pubsdir://doc/Page99.pdf +docfile: docsdir://doc/Page99.pdf notes: [] tags: [search, network]