Skip to content

Commit e90b6c3

Browse files
Skip sticky-bit check in isDeletableFile on WASI (#785)
WASI does not surface the sticky bit and getuid, so we cannot check whether the file is actually deletable before attempting to delete it.
1 parent 0b3974d commit e90b6c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/FileManager/FileManager+Files.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ extension _FileManagerImpl {
461461
parent = fileManager.currentDirectoryPath
462462
}
463463

464-
#if os(Windows)
464+
#if os(Windows) || os(WASI)
465465
return fileManager.isWritableFile(atPath: parent) && fileManager.isWritableFile(atPath: path)
466466
#else
467467
guard fileManager.isWritableFile(atPath: parent),

0 commit comments

Comments
 (0)