Skip to content

skipping symlink with 0-length value #656

@jbd

Description

@jbd

Hello,

I've got filesystems with some symlink entries with 0-length value (all of them are symbolic links to a hard drive within a Wine subdirectory). I don't know how to create them in the first place, my few attempts were a failure.

Example below with the the 'z' symlink.

$ ls -l Wine\ Files/dosdevices/

c -> ../drive_c
z -> ''

When running dsync, it translates to this error during the file creation phase:

ERROR: Create [...]/dosdevices/z symlink() failed, (errno=2 No such file or directory)

Using rsync, those special symlink are explicitly skipped:

skipping symlink with 0-length value: "[...]/Wine Files/dosdevices/z"

This is the code in rsync flist.c:

#ifdef SUPPORT_LINKS
                if (preserve_links && S_ISLNK(file->mode)) {
                        symlink_name = F_SYMLINK(file);
                        symlink_len = strlen(symlink_name);
                        if (symlink_len == 0) {
                                io_error |= IOERR_GENERAL;
                                f_name(file, fbuf);
                                rprintf(FERROR_XFER,
                                    "skipping symlink with 0-length value: %s\n",
                                    full_fname(fbuf));
                                return NULL;
                        }
                } else {
                        symlink_name = NULL;
                        symlink_len = 0;
                }
#endif

It would be nice to have a more explicit message rather than the actual 'No such file or directory'.

Jean-Baptiste

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