Skip to content

Commit 90700c1

Browse files
authored
Don't try to set extended attributes on Android (#1106)
Normal users don't have permission to change these, even for their own files.
1 parent 280ebf6 commit 90700c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/FileManager/FileOperations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ enum _FileOperations {
951951

952952
#if !canImport(Darwin)
953953
private static func _copyDirectoryMetadata(srcFD: CInt, srcPath: @autoclosure () -> String, dstFD: CInt, dstPath: @autoclosure () -> String, delegate: some LinkOrCopyDelegate) throws {
954-
#if !os(WASI)
954+
#if !os(WASI) && !os(Android)
955955
// Copy extended attributes
956956
var size = flistxattr(srcFD, nil, 0)
957957
if size > 0 {

0 commit comments

Comments
 (0)