@@ -9,7 +9,6 @@ public struct FileSyncSession: Identifiable {
99 public let betaPath : String
1010 public let status : FileSyncStatus
1111
12- public let maxSize : FileSyncSessionEndpointSize
1312 public let localSize : FileSyncSessionEndpointSize
1413 public let remoteSize : FileSyncSessionEndpointSize
1514
@@ -25,14 +24,14 @@ public struct FileSyncSession: Identifiable {
2524 } else {
2625 " Unknown "
2726 }
28- if state. session. beta. protocol == Url_Protocol . ssh, !state. session. beta. host. isEmpty {
27+ agentHost = if state. session. beta. protocol == Url_Protocol . ssh, !state. session. beta. host. isEmpty {
2928 // TOOD: We need to either:
3029 // - make this compatible with custom suffixes
3130 // - always strip the tld
3231 // - always keep the tld
33- agentHost = state. session. beta. host
32+ state. session. beta. host
3433 } else {
35- agentHost = " Unknown "
34+ " Unknown "
3635 }
3736 betaPath = if !state. session. beta. path. isEmpty {
3837 state. session. beta. path
@@ -64,7 +63,6 @@ public struct FileSyncSession: Identifiable {
6463 dirCount: state. betaState. directories,
6564 symLinkCount: state. betaState. symbolicLinks
6665 )
67- maxSize = localSize. maxOf ( other: remoteSize)
6866
6967 errors = accumulateErrors ( from: state)
7068 }
@@ -77,9 +75,6 @@ public struct FileSyncSession: Identifiable {
7775
7876 public var sizeDescription : String {
7977 var out = " "
80- if localSize != remoteSize {
81- out += " Maximum: \n \( maxSize. description ( linePrefix: " " ) ) \n \n "
82- }
8378 out += " Local: \n \( localSize. description ( linePrefix: " " ) ) \n \n "
8479 out += " Remote: \n \( remoteSize. description ( linePrefix: " " ) ) "
8580 return out
@@ -99,15 +94,6 @@ public struct FileSyncSessionEndpointSize: Equatable {
9994 self . symLinkCount = symLinkCount
10095 }
10196
102- func maxOf( other: FileSyncSessionEndpointSize ) -> FileSyncSessionEndpointSize {
103- FileSyncSessionEndpointSize (
104- sizeBytes: max ( sizeBytes, other. sizeBytes) ,
105- fileCount: max ( fileCount, other. fileCount) ,
106- dirCount: max ( dirCount, other. dirCount) ,
107- symLinkCount: max ( symLinkCount, other. symLinkCount)
108- )
109- }
110-
11197 public var humanSizeBytes : String {
11298 humanReadableBytes ( sizeBytes)
11399 }
0 commit comments