Skip to content

Commit cc232f8

Browse files
committed
FoundationEssentials: limit autosave to user domain
During the review for the changes to support Windows, we realized that the location that is being used for the autosave information is only available within the user domain mask. The Windows implementation was corrected as part of the implementation, but this corrects the XDG compliant path to reflect this reality.
1 parent f657181 commit cc232f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/FileManager/SearchPaths/FileManager+XDGSearchPaths.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private enum _XDGUserDirectory: String {
164164

165165
func _XDGSearchPathURL(for directory: FileManager.SearchPathDirectory, in domain: FileManager.SearchPathDomainMask) -> URL? {
166166
return switch (directory, domain) {
167-
case (.autosavedInformationDirectory, _):
167+
case (.autosavedInformationDirectory, .userDomainMask):
168168
_xdgDataHomeURL().appending(component: "Autosave Information", directoryHint: .isDirectory)
169169

170170
case (.desktopDirectory, .userDomainMask):

0 commit comments

Comments
 (0)