Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Sources/FoundationEssentials/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ package struct Platform {
_pageSize
}

// FIXME: Windows SEPARATOR
static let PATH_SEPARATOR: Character = "/"
static let MAX_HOSTNAME_LENGTH = 1024

static func roundDownToMultipleOfPageSize(_ size: Int) -> Int {
Expand Down
8 changes: 1 addition & 7 deletions Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,7 @@ extension _ProcessInfo {
guard let processPath = CommandLine.arguments.first else {
return ""
}

if let lastSlash = processPath.lastIndex(of: Platform.PATH_SEPARATOR) {
return String(processPath[
processPath.index(after: lastSlash) ..< processPath.endIndex])
}

return processPath
return processPath.lastPathComponent
}

#if os(macOS)
Expand Down