Skip to content
  • Fabian Vogt's avatar
    Rewrite absolute symlinks to stay inside their origin · 2fb5da81
    Fabian Vogt authored and Alexander Saoutkin's avatar Alexander Saoutkin committed
    Absolute symlinks have a different meaning when accessed though the regular
    filesystem, they don't anchor to the mounted URL anymore:
    sftp://server/tmp/symlink -> /home/user/
    /mnt/sftp/server/tmp/symlink -> /home/user/
    Rewrite absolute symlinks when reading or writing them to keep the target
    consistent:
    /mnt/sftp/server/tmp/symlink -> /mnt/sftp/server/home/user/
    
    It is necessary that KIOFuseVFS is aware of the mountpoint now, to be able to
    deal with absolute paths. This is not ideal as it doesn't account for bind
    mounts or symlinks.
    
    Use readlink in fileopstest to get the raw link target instead of an absolute
    path.
    
    BUG: 422090
    2fb5da81