Skip to content

Commit 05fc5eb

Browse files
kateinoigakukunMaxDesiatov
authored andcommitted
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. (cherry picked from commit e90b6c3)
1 parent 0e3174f commit 05fc5eb

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)