summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel/recv-media.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index 67dded55..0be20d0c 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -13,8 +13,10 @@ writeScriptBin "recv-media" ''
13 PATH=${coreutils}/bin 13 PATH=${coreutils}/bin
14 14
15 dir=/var/media 15 dir=/var/media
16 tmpFile="''${dir}"/.tmp/$(basename "$1")
16 target="''${dir}"/$(basename "$1") 17 target="''${dir}"/$(basename "$1")
17 tmpFile=$(${coreutils}/bin/mktemp --dry-run --tmpdir=''${dir} .recv-media.XXXXXXXXXX) 18
19 mkdir -pv $(basename "''${tmpFile}")
18 20
19 ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ''${tmpFile} && mv -v ''${tmpFile} "''${target}" 21 ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ''${tmpFile} && mv -v ''${tmpFile} "''${target}"
20 touch -c -m -t "$2" "''${target}" 22 touch -c -m -t "$2" "''${target}"