Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make NextCloud WORM file system friendly #24596

Merged
merged 3 commits into from
Sep 16, 2022

Commits on Aug 25, 2022

  1. files: make OC\Files\Storage\Local WORM friendly

    Some filesystems run as a Write-Once-Read-Many storages. This
    makes them impossible to use with NexeCloud, as the file system
    layers uses `truncate` syscall (through file_put_contents function).
    
    As Nextcloud is never updates existing files, removing the old entry
    and creatint a new one on update will allow NextCoud to update on such
    file systems.
    
    Update Local#fopen and Local#file_put_contents to remote existing
    file before truncating.
    
    Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
    kofemann committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    b6065a2 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2022

  1. files: remove destination file before copying new content (WORM)

    Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
    kofemann committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    8fc4cf6 View commit details
    Browse the repository at this point in the history
  2. config: add a switch to control truncate before update

    To avoid extra truncate on non WORM file systems, add a new config
    option `localstorage.unlink_on_truncate`, which defaults to false.
    
    The OC\Files\Storage\Local is update to respect that option.
    
    Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
    kofemann committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    f41209a View commit details
    Browse the repository at this point in the history