Skip to content

Update FileManager for use by SCL-F #609

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

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func _readFileAttributePrimitive<T: BinaryInteger>(_ value: Any?, as type: T.Typ
}
#endif

if let binInt = value as? (any BinaryInteger), let result = T(exactly: binInt) {
if let exact = value as? T {
return exact
} else if let binInt = value as? (any BinaryInteger), let result = T(exactly: binInt) {
return result
}
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private enum _XDGUserDirectory: String {

let path = String(line[line.unicodeScalars.index(after: equalsIdx)...])._trimmingWhitespace()
if !path.isEmpty {
entries[directory] = home.appending(path: path)
entries[directory] = URL(filePath: path, directoryHint: .isDirectory, relativeTo: home)
}
} else {
return nil // Incorrect syntax.
Expand Down