@@ -467,13 +467,6 @@ struct FileListView: View {
467467 fileCacheSize = FileCache . shared. diskCacheSize ( )
468468 }
469469
470- func formatBytes( _ bytes: Int64 ) -> String {
471- let formatter = ByteCountFormatter ( )
472- formatter. allowedUnits = [ . useTB, . useGB, . useMB, . useKB]
473- formatter. countStyle = . file
474- return formatter. string ( fromByteCount: bytes)
475- }
476-
477470 func fetchUsageInfo( ) {
478471 guard let serverURL = auth. serverURL, let token = auth. token,
479472 let url = URL ( string: " \( serverURL) /api/usage/ " ) else {
@@ -869,10 +862,6 @@ struct FileListView: View {
869862 }
870863 }
871864
872- func encodedPath( _ path: String , allowed: CharacterSet = . urlPathAllowed) -> String ? {
873- return path. addingPercentEncoding ( withAllowedCharacters: allowed)
874- }
875-
876865 func renameSelectedItem( ) {
877866 guard let item = selectedItems. first else { return }
878867 let fromPath = item. path
@@ -936,7 +925,7 @@ struct FileListView: View {
936925 )
937926 let fullPath = self . fullPath ( for: fileItem)
938927
939- guard let encodedPath = encodedPath ( fullPath) else {
928+ guard let encodedPath = fullPath. addingPercentEncoding ( withAllowedCharacters : . urlPathAllowed ) else {
940929 Log . error ( " ❌ Failed to encode path " )
941930 viewModel. errorMessage = " Failed to encode path "
942931 return
0 commit comments