Improved general file system reliability#132
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to improve overall virtual filesystem reliability and correctness across multiple backends (WinFsp/Dokany/FUSE/WebDAV/Android SAF), mainly by fixing concurrency hazards, making file metadata/size reporting more accurate, and removing debug-time behaviors that could disrupt production use.
Changes:
- Tighten thread-safety and metadata correctness in WinFsp/Dokany/FUSE handle and stream operations (locking, refreshed metadata, corrected size reporting).
- Improve Android SAF/provider behavior (faster enumeration, correct document ID/root handling, better error semantics, thumbnail generation updates).
- Disable filename caching by default and perform broad cleanup/removal of debug artifacts and unused code.
Reviewed changes
Copilot reviewed 66 out of 77 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SecureFolderFS.Tests/CliTests/Commands/VaultShellCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/VaultRunCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/VaultInfoCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/VaultCreateCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/CredsRemoveCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/CredsChangeCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/Commands/CredsAddCommandTests.cs | Whitespace cleanup in CLI test |
| tests/SecureFolderFS.Tests/CliTests/CliExecutionResult.cs | Whitespace cleanup in test helper |
| src/Shared/SecureFolderFS.Storage/VirtualFileSystem/VirtualFileSystemOptions.cs | Disable filename caching by default |
| src/Platforms/SecureFolderFS.Uno/Views/Settings/PreferencesSettingsPage.xaml.cs | WebDAV banner + “Apply” action |
| src/Platforms/SecureFolderFS.Uno/Views/Settings/PreferencesSettingsPage.xaml | Add InfoBar action button |
| src/Platforms/SecureFolderFS.Uno/UserControls/LoginOptions.xaml.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Uno/TemplateSelectors/LoginTemplateSelector.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Uno/Platforms/Desktop/ServiceImplementation/SkiaVaultCredentialsService.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Uno/Helpers/WebDavRedirectorHelpers.cs | Windows WebDAV redirector helpers |
| src/Platforms/SecureFolderFS.Uno/Dialogs/PaymentDialog.xaml.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Uno/App.xaml.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Views/Modals/Vault/FilePreviewModalPage.xaml.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Views/Modals/Vault/BrowserSearchModalPage.xaml.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/TemplateSelectors/LoginTemplateSelector.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Platforms/iOS/ServiceImplementation/IOSVaultCredentialsService.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Platforms/iOS/ServiceImplementation/IOSShareService.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/Storage/AndroidStorable.cs | Remove debugger breakpoint |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/Storage/AndroidFolder.cs | Faster enumeration + safer delete |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/Storage/AndroidFile.cs | Seekable reads + non-truncating writes |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/ServiceImplementation/ShareContentProvider.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/ServiceImplementation/AndroidVaultCredentialsService.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/ServiceImplementation/AndroidMediaService.cs | Use shared thumbnail helper |
| src/Platforms/SecureFolderFS.Maui/Platforms/Android/AppModels/StreamedMediaSource.cs | Remove duplicate media source |
| src/Platforms/SecureFolderFS.Cli/CredentialReader.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Cli/CliTypeActivator.cs | Remove unused activator helper |
| src/Platforms/SecureFolderFS.Cli/CliOutput.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Cli/CliGlobalOptions.cs | Whitespace cleanup |
| src/Platforms/SecureFolderFS.Cli/CliCommandHelpers.cs | Whitespace cleanup |
| src/Core/SecureFolderFS.Core.WinFsp/OpenHandles/WinFspFileHandle.cs | Refresh metadata + accurate size |
| src/Core/SecureFolderFS.Core.WinFsp/Callbacks/OnDeviceWinFsp.cs | Concurrency + enumeration reliability fixes |
| src/Core/SecureFolderFS.Core.WinFsp/AppModels/WinFspOptions.cs | Disable filename caching by default |
| src/Core/SecureFolderFS.Core.WinFsp/AppModels/DirectoryEnumerationContext.cs | Track directory enumeration state |
| src/Core/SecureFolderFS.Core.WebDav/WebDavWrapper.cs | More resilient HTTP accept/dispatch loop |
| src/Core/SecureFolderFS.Core.WebDav/AppModels/WebDavOptions.cs | Disable filename caching by default |
| src/Core/SecureFolderFS.Core.MobileFS/SecureFolderFS.Core.MobileFS.csproj | Remove redundant compile item |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/Helpers/ThumbnailHelpers.cs | Fix thumbnail generation semantics |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/FileSystem/RootCollection.cs | Thread-safe root enumeration snapshot |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/FileSystem/ReadWriteCallbacks.cs | Correct errno signaling on failures |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/FileSystem/Projections.cs | Include last-modified in projection |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/FileSystem/FileSystemProvider.Main.cs | SAF correctness + notifications + thumbnails |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/FileSystem/FileSystemProvider.Helpers.cs | Document ID/root handling improvements |
| src/Core/SecureFolderFS.Core.MobileFS/Platforms/Android/AppModels/StreamedMediaSource.cs | Shared streamed media data source |
| src/Core/SecureFolderFS.Core.FUSE/OpenHandles/FuseHandlesManager.cs | Correct access flags + stable snapshots |
| src/Core/SecureFolderFS.Core.FUSE/Callbacks/OnDeviceFuse.cs | Locking + correct open/write semantics |
| src/Core/SecureFolderFS.Core.FUSE/AppModels/FuseOptions.cs | Fix option mapping bug |
| src/Core/SecureFolderFS.Core.FileSystem/UniversalCache.cs | Add bounded capacity eviction |
| src/Core/SecureFolderFS.Core.FileSystem/Streams/StreamsAccess.cs | Atomic crypt-file get-or-create |
| src/Core/SecureFolderFS.Core.FileSystem/Streams/PlaintextStream.cs | Correct gap semantics + header locking |
| src/Core/SecureFolderFS.Core.FileSystem/Storage/StorageProperties/CryptoSizeOfProperty.cs | Clamp size for unwritten headers |
| src/Core/SecureFolderFS.Core.FileSystem/Storage/CryptoStorable.cs | Fix root boundary check |
| src/Core/SecureFolderFS.Core.FileSystem/Storage/CryptoFolder.cs | Fix plaintext ID computation |
| src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/PathHelpers.cs | macOS mount path handling tweak |
| src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Native/NativePathHelpers.Directory.cs | Ensure full DirectoryId reads |
| src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Native/NativePathHelpers.cs | Safer relative-path computation |
| src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Abstract/AbstractPathHelpers.Directory.cs | Ensure full DirectoryId reads + validate cache |
| src/Core/SecureFolderFS.Core.FileSystem/FileNames/NameWithDirectoryId.cs | Fix equality/hash correctness |
| src/Core/SecureFolderFS.Core.FileSystem/Extensions/FileHeaderExtensions.cs | Synchronize header initialization |
| src/Core/SecureFolderFS.Core.FileSystem/CryptFiles/OpenCryptFileManager.cs | Add atomic GetOrCreate |
| src/Core/SecureFolderFS.Core.FileSystem/CryptFiles/OpenCryptFile.cs | Thread-safe opened-stream tracking |
| src/Core/SecureFolderFS.Core.FileSystem/Chunks/ChunkWriter.cs | Avoid silent data loss on out-of-order writes |
| src/Core/SecureFolderFS.Core.FileSystem/Chunks/ChunkReader.cs | Remove debugger breakpoint |
| src/Core/SecureFolderFS.Core.FileSystem/Chunks/ChunkAccess.cs | Synchronize chunk operations |
| src/Core/SecureFolderFS.Core.FileSystem/Chunks/CachingChunkAccess.cs | Flush correctness + avoid unnecessary flush |
| src/Core/SecureFolderFS.Core.FileSystem/Buffers/HeaderBuffer.cs | Add header synchronization root |
| src/Core/SecureFolderFS.Core.Dokany/OpenHandles/DokanyHandlesManager.cs | Provide security to handles manager |
| src/Core/SecureFolderFS.Core.Dokany/OpenHandles/DokanyFileHandle.cs | Translate plaintext locks to ciphertext |
| src/Core/SecureFolderFS.Core.Dokany/DokanyFileSystem.cs | Pass security into handles manager |
| src/Core/SecureFolderFS.Core.Dokany/Callbacks/OnDeviceDokany.cs | Reliability + atomic replace move |
| src/Core/SecureFolderFS.Core.Dokany/Callbacks/BaseDokanyCallbacks.cs | Lock stream ops + improved error mapping |
| src/Core/SecureFolderFS.Core.Dokany/AppModels/DokanyOptions.cs | Disable filename caching by default |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
Weird |
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.
No description provided.