Skip to content
  • Rok Mandeljc's avatar
    fuse: Add GError to errno mappings for G_IO_ERROR_WOULD_RECURSE and G_IO_ERROR_WOULD_MERGE · 4341cf2b
    Rok Mandeljc authored
    This patch adds the following GError to errno mappings to
    errno_from_error():
    G_IO_ERROR_WOULD_RECURSE -> EXDEV
    G_IO_ERROR_WOULD_MERGE -> ENOTEMPTY
    
    The first mapping is required to allow 'mv' to rename/move a
    directory in a gvfs-fuse directory that belongs to a backend
    without support for a native move operation. In such cases,
    g_file_move() returns G_IO_ERROR_WOULD_RECURSE, which needs to
    be mapped to -EXDEV in order for mv to fall back to recursive
    copy & delete operation.
    
    Similarly, G_IO_ERROR_WOULD_MERGE is returned when trying to
    move/merge two non-empty directories. By mapping it to -ENOTEMPTY,
    the error message returned by 'mv' becomes ": Directory not empty"
    instead of generic ": Input/output error".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734568
    
    
    
    Signed-off-by: default avatarRok Mandeljc <rok.mandeljc@gmail.com>
    4341cf2b