Skip to content

Avoid considering EEXIST an error when mkdir #863

@yihuaeyang

Description

@yihuaeyang

rsync/main.c

Line 788 in b905ab2

mkdir_error:

If multiple rsync tasks run at the same time with the same destination dir, there is a chance for one of them to report something like thie following

rsync: mkdir "<dir_path>" failed: File exists (17)

This seems due to the race condition where all rsync tasks determine the dir did not exist and try to mkdir.

In this case if mkdir reports EEXIST and the dest is actually a dir then perhaps do not consider it as an error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions