opencloud icon indicating copy to clipboard operation
opencloud copied to clipboard

posix: file revisions are not deleted when item is purged from trash

Open butonic opened this issue 1 month ago β€’ 0 comments

create a new file and make three edits to it. The disk should now know them:

❯ tree -ah /home/jfd/.opencloud/storage/users/users/
[4.0K]  /home/jfd/.opencloud/storage/users/users/
└── [4.0K]  cd88bf9a-dd7f-11ef-a609-7f78deb2345f
    β”œβ”€β”€ [   3]  New file.txt
    β”œβ”€β”€ [4.0K]  .oc-nodes
    β”‚   β”œβ”€β”€ [4.0K]  b3
    β”‚   β”‚   └── [4.0K]  f7
    β”‚   β”‚       └── [4.0K]  3c
    β”‚   β”‚           └── [4.0K]  e2
    β”‚   β”‚               β”œβ”€β”€ [   0]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:50.976406172Z
    β”‚   β”‚               β”œβ”€β”€ [   1]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:55.53780399Z
    β”‚   β”‚               └── [   2]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:56.603235102Z
    β”‚   └── [4.0K]  locks
    └── [4.0K]  .oc-tmp

9 directories, 4 files

when you delete the file it is moved to the trash and the disk will look like this:

❯ tree -ah /home/jfd/.opencloud/storage/users/users/
[4.0K]  /home/jfd/.opencloud/storage/users/users/
└── [4.0K]  cd88bf9a-dd7f-11ef-a609-7f78deb2345f
    β”œβ”€β”€ [4.0K]  .oc-nodes
    β”‚   β”œβ”€β”€ [4.0K]  b3
    β”‚   β”‚   └── [4.0K]  f7
    β”‚   β”‚       └── [4.0K]  3c
    β”‚   β”‚           └── [4.0K]  e2
    β”‚   β”‚               β”œβ”€β”€ [   0]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:50.976406172Z
    β”‚   β”‚               β”œβ”€β”€ [   1]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:55.53780399Z
    β”‚   β”‚               └── [   2]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:56.603235102Z
    β”‚   └── [4.0K]  locks
    β”œβ”€β”€ [4.0K]  .oc-tmp
    └── [4.0K]  .Trash
        β”œβ”€β”€ [4.0K]  files
        β”‚   └── [   3]  b3f73ce2-8d57-4a81-8827-031db9b962ac.trashitem
        └── [4.0K]  info
            └── [  63]  b3f73ce2-8d57-4a81-8827-031db9b962ac.trashinfo

12 directories, 5 files

now if you purge the item from trash the node metadata for revisions should have been deleted. however, we can see that they are still there:

❯ tree -ah /home/jfd/.opencloud/storage/users/users/
[4.0K]  /home/jfd/.opencloud/storage/users/users/
└── [4.0K]  cd88bf9a-dd7f-11ef-a609-7f78deb2345f
    β”œβ”€β”€ [4.0K]  .oc-nodes
    β”‚   β”œβ”€β”€ [4.0K]  b3
    β”‚   β”‚   └── [4.0K]  f7
    β”‚   β”‚       └── [4.0K]  3c
    β”‚   β”‚           └── [4.0K]  e2
    β”‚   β”‚               β”œβ”€β”€ [   0]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:50.976406172Z
    β”‚   β”‚               β”œβ”€β”€ [   1]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:55.53780399Z
    β”‚   β”‚               └── [   2]  -8d57-4a81-8827-031db9b962ac.REV.2025-11-13T13:05:56.603235102Z
    β”‚   └── [4.0K]  locks
    β”œβ”€β”€ [4.0K]  .oc-tmp
    └── [4.0K]  .Trash
        β”œβ”€β”€ [4.0K]  files
        └── [4.0K]  info

12 directories, 3 files

butonic avatar Nov 13 '25 13:11 butonic