Re: move instead of copy

Julian Squires <[email protected]> Tue, 15 Sep 2015 17:51:51 -0400
Newsgroups gmane.network.unison.devel
Message-ID <CAEbLoB+_2cGDJ2s9dY=aYCTv++TLXkZbG6yNT2HVwimsOjbCvQ@mail.gmail.com>
I am considering implementing this.

At least in the case of Posix systems, couldn't one rename(2) and if
it fails with EXDEV, then fall back to copy-and-delete?

On Tue, Sep 15, 2015 at 12:51 PM, Trevor Jim <[email protected]> wrote:
> As I recall, the reason for the copy is that sometimes move is not
> atomic.
>
> For example, a move from one hard disk to another is actually a copy and
> a delete.  The copy could fail in the middle.
>
> It is hard to tell how a move will be implemented from just the path of
> source and destination.
>
> Using copy+delete instead of a move is therefore a safer approach, since
> Unison knows that copies can fail and takes this into account so that
> you do not lose data.
>
> Something to keep in mind...
>
> -Trevor
> _______________________________________________
> Unison-hackers mailing list
> [email protected]
> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers



-- 
Julian Squires