Skip to content

Handle macOS alias files in File Provider Extension#9445

Merged
i2h3 merged 1 commit intomasterfrom
i2h3/fix/8436-aliases
Mar 10, 2026
Merged

Handle macOS alias files in File Provider Extension#9445
i2h3 merged 1 commit intomasterfrom
i2h3/fix/8436-aliases

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Feb 11, 2026

Our file provider extension reports back public.content as the fallback content type for items it cannot find a MIME type for by using UniformTypeIdentifiers framework.

macOS alias files do not have a standardized MIME type because they are specific to macOS. Hence our extension stores an empty string. In the conversion back to a FileProviderItemProtocol object a fallback switch returns content, even though it should have been aliasFile.

This closes #8436.

@i2h3 i2h3 added this to the 33.0.0 milestone Feb 11, 2026
@i2h3 i2h3 self-assigned this Feb 11, 2026
@i2h3 i2h3 added the bug label Feb 11, 2026
@i2h3 i2h3 added the feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. label Feb 11, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Feb 11, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Feb 11, 2026
@i2h3 i2h3 force-pushed the i2h3/fix/8436-aliases branch from d32153c to 833dac2 Compare February 11, 2026 15:58
@i2h3 i2h3 modified the milestones: 33.0.0, 33.1.0 Feb 26, 2026
@i2h3 i2h3 force-pushed the i2h3/fix/8436-aliases branch 2 times, most recently from ef42c6a to 4b14466 Compare March 10, 2026 14:12
@i2h3 i2h3 marked this pull request as ready for review March 10, 2026 14:15
@i2h3 i2h3 changed the title Do not discard macOS alias type identifier fix(file-provider): Fully handle macOS alias files without MIME type or extension (fixes #8436) Mar 10, 2026
@i2h3 i2h3 changed the title fix(file-provider): Fully handle macOS alias files without MIME type or extension (fixes #8436) Handle macOS alias files in File Provider Extension Mar 10, 2026
@i2h3
Copy link
Collaborator Author

i2h3 commented Mar 10, 2026

/backport to stable-33.0

@i2h3 i2h3 force-pushed the i2h3/fix/8436-aliases branch from 4b14466 to c9fb165 Compare March 10, 2026 14:55
…or extension (fixes #8436)

macOS alias files have no MIME type and no file extension, so their type
cannot be inferred from server metadata alone during enumeration.

On upload, preserve the `com.apple.alias-file` UTI in stored metadata
instead of falling back to an empty string when no MIME type is available.

On download, detect alias files by reading the Apple Bookmark magic bytes
("book", 0x62 0x6F 0x6F 0x6B) from the fetched file content. When found,
update the stored metadata with the correct content type so the File
Provider framework handles the file as an alias rather than opaque binary
data.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/fix/8436-aliases branch from c9fb165 to 22dbedb Compare March 10, 2026 15:37
@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-9445.zip

Digest: sha256:2f1bbc2805320eaca8bef38fca91339b29d8c799539bc32b1e1980388498b13a

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud
Copy link

@i2h3 i2h3 merged commit fb1a11c into master Mar 10, 2026
24 checks passed
@i2h3 i2h3 deleted the i2h3/fix/8436-aliases branch March 10, 2026 19:12
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system.

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

Aliases broken in macOS File Provider

1 participant