You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the following code, I noticed a race condition that causes us to return nil for the currentDirectoryPath even though there’s always a current directory path on Windows.
Reading the following code, I noticed a race condition that causes us to return
nil
for thecurrentDirectoryPath
even though there’s always a current directory path on Windows.swift-foundation/Sources/FoundationEssentials/FileManager/FileManager+Directories.swift
Lines 467 to 476 in a0147ac
Race:
let dwLength: DWORD = GetCurrentDirectoryW(0, nil)
and allocate a buffer of the lengthdwLength
GetCurrentDirectoryW
call returns a non-zero value_Filemanager.currentDirectoryPath
returnsnil
even though a current directory existed.The text was updated successfully, but these errors were encountered: