diff --git a/src/_adr_add_link b/src/_adr_add_link index 9814e45..b3fa7b0 100755 --- a/src/_adr_add_link +++ b/src/_adr_add_link @@ -25,4 +25,7 @@ awk -v link_type="$link_type" -v target="$(basename $target)" -v target_title="$ { print } ' "$source" > "$source.tmp" -mv "$source.tmp" "$source" +if [ -e "$source.tmp" ]; +then + mv "$source.tmp" "$source" +fi diff --git a/src/_adr_remove_status b/src/_adr_remove_status index 497051e..dd97756 100755 --- a/src/_adr_remove_status +++ b/src/_adr_remove_status @@ -29,4 +29,7 @@ awk -v current_status="$current_status" ' { print } ' "$file" > "$file.tmp" -mv "$file.tmp" "$file" +if [ -e "$file.tmp" ]; +then + mv "$file.tmp" "$file" +fi