From 48fefcd59b2b814b187d394ae5f8148884868ffb Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 1 Aug 2024 16:22:23 +0800 Subject: [PATCH] Check lock ownership based on remote interface username --- Sources/NextcloudFileProviderKit/Item/Item.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/NextcloudFileProviderKit/Item/Item.swift b/Sources/NextcloudFileProviderKit/Item/Item.swift index 9e28710..93d68a5 100644 --- a/Sources/NextcloudFileProviderKit/Item/Item.swift +++ b/Sources/NextcloudFileProviderKit/Item/Item.swift @@ -153,7 +153,7 @@ public class Item: NSObject, NSFileProviderItem { public var fileSystemFlags: NSFileProviderFileSystemFlags { if metadata.lock, - metadata.lockOwner != metadata.userId, + metadata.lockOwner != remoteInterface.account.username, metadata.lockTimeOut ?? Date() > Date() { return [.userReadable]