-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Read owner and permissions from PUT response on new file creation #4105
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
base: master
Are you sure you want to change the base?
Changes from all commits
f9e7823
45fcb83
4d19a87
ac2de08
6fc9611
a1c9a44
48c50c9
c9cc682
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,17 +11,11 @@ extension NCMedia { | |
| guard let tblAccount = await self.database.getTableAccountAsync(predicate: NSPredicate(format: "account == %@", self.session.account)) else { | ||
| return | ||
| } | ||
| let capabilities = await NKCapabilities.shared.getCapabilities(for: self.session.account) | ||
| let mediaPredicate = self.imageCache.getMediaPredicate(session: self.session, | ||
| mediaPath: tblAccount.mediaPath, | ||
| showOnlyImages: self.showOnlyImages, | ||
| showOnlyVideos: self.showOnlyVideos) | ||
| var sortedByKeyPath: String | ||
| if capabilities.serverVersionMajor >= self.global.nextcloudVersionFuture { | ||
| sortedByKeyPath = "datePhotosOriginal" | ||
| } else { | ||
|
Comment on lines
-20
to
-22
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This never happens? I removed it @marinofaggiana |
||
| sortedByKeyPath = "date" | ||
| } | ||
| let sortedByKeyPath = "date" | ||
|
|
||
| if let metadatas = await self.database.getMetadatasAsync(predicate: mediaPredicate, sortedByKeyPath: sortedByKeyPath, ascending: false) { | ||
| self.database.filterAndNormalizeLivePhotos(from: metadatas) { metadatas in | ||
|
|
@@ -180,13 +174,6 @@ extension NCMedia { | |
| mediaPredicate | ||
| ]) | ||
|
|
||
| if capabilities.serverVersionMajor >= self.global.nextcloudVersionFuture { | ||
| predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [ | ||
| NSPredicate(format: "datePhotosOriginal >= %@ AND datePhotosOriginal <= %@ AND mediaSearch == true", greaterDate as NSDate, lessDate as NSDate), | ||
| mediaPredicate | ||
| ]) | ||
| } | ||
|
Comment on lines
-183
to
-188
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This never happens? I removed it @marinofaggiana |
||
|
|
||
| let localMetadatas = await self.database.getMetadatasAsync(predicate: predicate) | ||
|
|
||
| await MainActor.run { | ||
|
|
@@ -258,12 +245,7 @@ public class NCMediaDataSource: NSObject { | |
|
|
||
| private func getMetadataFromTableMetadata(_ metadata: tableMetadata) -> Metadata { | ||
| let capabilities = NCNetworking.shared.capabilities[metadata.account] ?? NKCapabilities.Capabilities() | ||
| let date: Date | ||
| if capabilities.serverVersionMajor >= self.global.nextcloudVersionFuture { | ||
| date = metadata.datePhotosOriginal as Date | ||
| } else { | ||
| date = metadata.date as Date | ||
| } | ||
| let date = metadata.date as Date | ||
| return Metadata(date: date, | ||
| etag: metadata.etag, | ||
| imageSize: CGSize(width: metadata.width, height: metadata.height), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,7 +153,7 @@ class NCContextMenuPlus: NSObject { | |
|
|
||
| // ------------------------------- RICHDOCUMENT TEXT | ||
|
|
||
| if capabilities.serverVersionMajor >= NCGlobal.shared.nextcloudVersion18, | ||
| if NCBrandOptions.shared.isServerVersion(capabilities, greaterOrEqualTo: .v18), | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better way to version check @marinofaggiana. |
||
| directory?.richWorkspace == nil, | ||
| !isDirectoryE2EE, | ||
| isNetworkReachable { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ex: 32 >= 999999?
This never happens? I removed it @marinofaggiana