🔒️ Restore macOS security-scoped bookmarks - #625
Merged
Conversation
…curity-scoped-bookmarks
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0fdbe8de3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
vinceglb
added a commit
to nik1062/FileKit
that referenced
this pull request
Jul 29, 2026
…tests Rebased onto main (80b901d), which added two expect declarations in vinceglb#625 that Linux had no actual for, so the merge no longer compiled: - withPath() in jvmAndNativeMain - resolveBookmarkData() in nonWebMain, replacing the old fromBookmarkData shape Both are now implemented, mirroring mingwX64. createdAt() no longer reports st_ctim. That is the inode status change time and is updated by writes and chmod, so it was reporting a fabricated creation time. Linux only exposes birth time via statx(STATX_BTIME), which Kotlin/Native does not bind and which several filesystems do not support, so null is returned. See https://man7.org/linux/man-pages/man7/inode.7.html MIME lookup now honours the globs2 `cs` flag, so case sensitive entries such as `*.C:cs` (C++ source) no longer collide with `*.c` (C source). Compound globs like `*.tar.gz` stay excluded on purpose: `extension` is the segment after the last dot, so registering them under "gz" would shadow the correct entry. filesDir/cacheDir no longer fall back to relative `.local/share` and `.cache` when HOME is unset, which could plant application data in the working directory. The passwd database is consulted first and a FileKitException is thrown if no absolute home can be resolved. Also: - Make the globs2 and mime.types parsers pure functions over their content so the matching rules are unit testable rather than host dependent. - Collapse the two duplicated FileKitUserDirectory switches into extension properties so XDG keys and folder names cannot drift. - Expand linuxTest to 25 tests covering timestamps, bookmarks, MIME matching, FileKit initialization and directory resolution; rename to the documented Subject_action_expectation convention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#590
Summary
PlatformFile.fromBookmarkData()as the supported convenience API and addresolveBookmarkData()for callers that needisStaleandshouldRefresh.PlatformFilepublic ABI while adding the new bookmark-resolution API.docs/and place internal design records and the captured ABI underspecs/.Validation
./gradlew :filekit-core:check :filekit-dialogs:check --no-daemon --console=plainktlint '**/*.kt' '**/*.kts' '!**/build/**' -R ktlint-compose-0.6.0-all.jargit diff --check origin/main...HEADorigin/main; there are no removed declarations.