From 868597396cd78d2bcef5a49645f9ab0b951de088 Mon Sep 17 00:00:00 2001 From: benton Date: Fri, 30 Jul 2021 18:55:29 -0500 Subject: [PATCH] relative paths are handled --- flake.nix | 2 +- knock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 5027a83..3bcc4a1 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ in { defaultPackage.x86_64-linux = nixpkgs.stdenv.mkDerivation { pname = "knock"; - version = "0.0.1"; + version = "0.1.0"; src = self; nativeBuildInputs = [ nixpkgs.makeWrapper ]; buildInputs = [ diff --git a/knock b/knock index 1449fff..a54d07f 100644 --- a/knock +++ b/knock @@ -9,7 +9,7 @@ parser.add_argument('acsm_file', metavar='file', type=str, help='the ACSM file t args = parser.parse_args() # these are all Path objects: https://docs.python.org/3/library/pathlib.html -args.acsm_file = Path(args.acsm_file).expanduser() +args.acsm_file = Path(args.acsm_file).expanduser().resolve() args.drm_file = args.acsm_file.with_suffix('.drm') args.epub_file = args.acsm_file.with_suffix('.epub') args.adobe_dir = Path('~/.config/knock').expanduser()