Fix "Shared by null" glitch in file details view

When file is uploaded it has ownerId == null.
We shall interpret this condition file being
owned by the current user.

Fixes #5005

Signed-off-by: Chris Narkiewicz <[email protected]>
This commit is contained in:
Chris Narkiewicz committed 2019-12-25 19:45:49 +00:00
1 parent 2047079898
commit ef8497697a
1 file changed
+2 -1
@@ -325,7 +325,8 @@ public class UserAccountManagerImpl implements UserAccountManager {
@Override
public boolean accountOwnsFile(OCFile file, Account account) {
return !TextUtils.isEmpty(file.getOwnerId()) && account.name.split("@")[0].equals(file.getOwnerId());
final String ownerId = file.getOwnerId();
return TextUtils.isEmpty(ownerId) || account.name.split("@")[0].equals(ownerId);
}
public boolean migrateUserId() {