From cd007a6716569891631765304ca7c1e1d1b7155a Mon Sep 17 00:00:00 2001 From: Jesse Gardner Date: Sun, 25 Apr 2021 20:45:13 -0700 Subject: [PATCH] reverted open_pipe's previous temp directory behavior (mkfifo can't overwrite empty file) --- qq2clone | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qq2clone b/qq2clone index d9d2079..b59d764 100755 --- a/qq2clone +++ b/qq2clone @@ -61,11 +61,11 @@ open_pipe () { check_pipe && return local fifo_path -fifo_path=$(mktemp) || temp_error +fifo_path=$(mktemp -d) || temp_error #shellcheck disable=2064 -trap "exec 3>&-; exec 3<&-;rm -f $fifo_path" EXIT -mkfifo "$fifo_path" || fifo_error -exec 3<>"$fifo_path" +trap "exec 3>&-; exec 3<&-;rm -rf $fifo_path" EXIT +mkfifo "$fifo_path/fifo" || fifo_error +exec 3<>"$fifo_path/fifo" return 0 } #=========================================================================#