File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ public final class FileLock {
182
182
if lockFileName. hasPrefix ( AbsolutePath . root. pathString) {
183
183
lockFileName = String ( lockFileName. dropFirst ( AbsolutePath . root. pathString. count) )
184
184
}
185
+ #if !os(Windows)
185
186
// back off until it occupies at most `NAME_MAX` UTF-8 bytes but without splitting scalars
186
187
// (we might split clusters but it's not worth the effort to keep them together as long as we get a valid file name)
187
188
var lockFileUTF8 = lockFileName. utf8. suffix ( Int ( NAME_MAX) )
@@ -191,6 +192,7 @@ public final class FileLock {
191
192
}
192
193
// we will never end up with nil since we have ASCII characters at the end
193
194
lockFileName = String ( lockFileUTF8) ?? lockFileName
195
+ #endif
194
196
let lockFilePath = lockFilesDirectory. appending ( component: lockFileName)
195
197
196
198
let lock = FileLock ( at: lockFilePath)
You can’t perform that action at this time.
0 commit comments