diff options
-rw-r--r-- | hel/recv-media.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix index a074e76b..7afd981d 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix | |||
@@ -27,12 +27,19 @@ writeScriptBin "recv-media" '' | |||
27 | tmpFile="''${dir}"/.tmp/$(basename "$1") | 27 | tmpFile="''${dir}"/.tmp/$(basename "$1") |
28 | target="''${dir}"/$(basename "$1") | 28 | target="''${dir}"/$(basename "$1") |
29 | 29 | ||
30 | logger --id=$pid -t recv-media -p user.debug <<EOF | ||
31 | $(id) | ||
32 | $(stat ${dir}) | ||
33 | $(stat ${1}) | ||
34 | $(print ${2}) | ||
35 | EOF | ||
36 | |||
30 | if ! cp -lnv --preserve=all "$1" "''${target}"; then | 37 | if ! cp -lnv --preserve=all "$1" "''${target}"; then |
31 | mkdir -pv $(dirname "''${tmpFile}") | 38 | mkdir -pv $(dirname "''${tmpFile}") |
32 | 39 | ||
33 | ionice -c 3 -t cp -vn --preserve=all "$1" "''${tmpFile}" && mv -v "''${tmpFile}" "''${target}" | 40 | ionice -c 3 -t cp -vn --preserve=all "$1" "''${tmpFile}" && mv -v "''${tmpFile}" "''${target}" |
34 | touch -c -m -t "$2" "''${target}" | ||
35 | fi | 41 | fi |
42 | touch -c -m -t "$2" "''${target}" | ||
36 | 43 | ||
37 | ${if notifyUser == null then "" else "#"}exit 0 | 44 | ${if notifyUser == null then "" else "#"}exit 0 |
38 | 45 | ||