If the second argument is a directory, append the filename from the
first argument. This matches the behavior of diff.
This commit is contained in:
@ -71,6 +71,12 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$f2" ]]
|
||||||
|
then
|
||||||
|
f=$(basename "$f1")
|
||||||
|
f2="$f2/$f"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$f2" != '/dev/null' ]] && [[ ! -f "$f2" ]]
|
if [[ "$f2" != '/dev/null' ]] && [[ ! -f "$f2" ]]
|
||||||
then
|
then
|
||||||
echo "$f2: No such file." >&2
|
echo "$f2: No such file." >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user