summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel/recv-media.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index 2c42c5da..e0306b9a 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -16,8 +16,10 @@ writeScriptBin "recv-media" ''
16 tmpFile="''${dir}"/.tmp/$(basename "$1") 16 tmpFile="''${dir}"/.tmp/$(basename "$1")
17 target="''${dir}"/$(basename "$1") 17 target="''${dir}"/$(basename "$1")
18 18
19 mkdir -pv $(dirname "''${tmpFile}") 19 if ! cp -lnv --preserve=all "$1" "''${target}"; then
20 mkdir -pv $(dirname "''${tmpFile}")
20 21
21 ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ''${tmpFile} && mv -v ''${tmpFile} "''${target}" 22 ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" "''${tmpFile}" && mv -v "''${tmpFile}" "''${target}"
22 touch -c -m -t "$2" "''${target}" 23 touch -c -m -t "$2" "''${target}"
24 fi
23'' 25''