1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-07 01:57:59 +03:00

F #3460: Better detect same location (#36)

This commit is contained in:
Jan Orel 2020-06-24 16:28:10 +02:00 committed by GitHub
parent 8a9f30ee30
commit 3681055a5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,10 @@ if [ `is_disk $DST_PATH` -eq 1 ]; then
exit 0
fi
if [ "$SRC" == "$DST" ]; then
DST_INODE=$(ssh "$DST_HOST" "ls -d -i \"$DST_DIR\" | awk '{print \$1}'")
SRC_INODE=$(ls -d -i "$SRC_DIR" | awk '{print $1}')
if [ "$SRC_INODE" = "$DST_INODE" ]; then
log "Not moving $SRC to $DST, they are the same path"
exit 0
fi