From 790dd365e15a21fc5caeabec9b9259167f4f6f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 12 May 2023 16:28:19 +0200 Subject: [PATCH] [postprocessor:exec] support tilde expansion for 'command' https://github.com/mikf/gallery-dl/issues/146#issuecomment-1544733532 --- gallery_dl/postprocessor/exec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gallery_dl/postprocessor/exec.py b/gallery_dl/postprocessor/exec.py index e81c6cfe..39188f16 100644 --- a/gallery_dl/postprocessor/exec.py +++ b/gallery_dl/postprocessor/exec.py @@ -11,6 +11,7 @@ from .common import PostProcessor from .. import util, formatter import subprocess +import os if util.WINDOWS: @@ -60,6 +61,7 @@ class ExecPP(PostProcessor): kwdict["_path"] = pathfmt.realpath args = [arg.format_map(kwdict) for arg in self.args] + args[0] = os.path.expanduser(args[0]) self._exec(args, False) if archive: