Folder size not propagated when uploading as share recipient with encryption enabled #24105

Closed
PVince81 opened this Issue Apr 19, 2016 · 5 comments

Projects

None yet

2 participants

@PVince81
Collaborator

Steps

  1. Setup OC 9.0.1
  2. Enable encryption
  3. Create two users "user1" and "user2"
  4. Login as "user1"
  5. Create a folder "test"
  6. Share "test" with "user2"
  7. Login as "user2"
  8. Create a subfolder "test/sub"
  9. Upload a non-empty file into "test/sub" in the web UI
  10. Navigate to folder "test"
  11. Check the size of the folder "sub"

Expected result

Size of "sub" matches contents

Actual result

Size of "sub" stays zero.
Entry in oc_filecache also has a size of zero.

Versions

ownCloud 9.0.1

Note that if you do the same without encryption it works fine.
So I suspect that some of the fileinfo size overrides code is messing up with folder size propagation.

@schiesbn @icewind1991

@PVince81
Collaborator

This is bad because it could also doesn't update the share owner's root folder size, so the usage quota isn't updated properly.

@PVince81
Collaborator
PVince81 commented Apr 19, 2016 edited

Also the folder sizes cannot properly be corrected with occ files:scan because of encrypted size vs unencrypted size! seems to work fine. occ:files:scan can be used to repair those folder sizes.

Regression check:

  • v8.2.2: ok
  • v8.2.3: ok
  • stable8.2: ok
  • v9.0.0: fail
  • v9.0.1: fail
@PVince81
Collaborator

Bisect was tough due to many internal server errors on the way.

It pointed at this commit: 1369f2c from PR #21851

Before that commit, even though the upload fails with 500 error, the folder size is correctly updated.
After that commit, the folder size is either -1 or 0. So not sure if that commits is directly related or if there is something else at play.

@icewind1991 can you have a look ?

@PVince81 PVince81 added this to the 9.0.2-current-maintenance milestone Apr 19, 2016
@icewind1991
Member

Ok, could reproduce in a unit test

@icewind1991
Member

Fix is here #24124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment