@@ -270,36 +270,39 @@ public async static Task<IList<StorageFolderWithPath>> GetFoldersWithPathAsync
270270
271271 private static PathBoxItem GetPathItem ( string component , string path )
272272 {
273+ var title = string . Empty ;
273274 if ( component . StartsWith ( CommonPaths . RecycleBinPath , StringComparison . Ordinal ) )
274275 {
275276 // Handle the recycle bin: use the localized folder name
276- return new PathBoxItem ( )
277- {
278- Title = ApplicationData . Current . LocalSettings . Values . Get ( "RecycleBin_Title" , "Recycle Bin" ) ,
279- Path = path ,
280- } ;
277+ title = "RecycleBin" . GetLocalizedResource ( ) ;
278+ }
279+ else if ( component . StartsWith ( CommonPaths . MyComputerPath , StringComparison . Ordinal ) )
280+ {
281+ title = "ThisPC" . GetLocalizedResource ( ) ;
282+ }
283+ else if ( component . StartsWith ( CommonPaths . NetworkFolderPath , StringComparison . Ordinal ) )
284+ {
285+ title = "SidebarNetworkDrives" . GetLocalizedResource ( ) ;
281286 }
282287 else if ( component . Contains ( ':' , StringComparison . Ordinal ) )
283288 {
284289 var drives = App . DrivesManager . Drives . Concat ( App . NetworkDrivesManager . Drives ) . Concat ( App . CloudDrivesManager . Drives ) ;
285290 var drive = drives . FirstOrDefault ( y => y . ItemType is NavigationControlItemType . Drive && y . Path . Contains ( component , StringComparison . OrdinalIgnoreCase ) ) ;
286- return new PathBoxItem ( )
287- {
288- Title = drive is not null ? drive . Text : $@ "Drive ({ component } )",
289- Path = path ,
290- } ;
291+ title = drive is not null ? drive . Text : $@ "Drive ({ component } )";
291292 }
292293 else
293294 {
294295 if ( path . EndsWith ( '\\ ' ) || path . EndsWith ( '/' ) )
295296 path = path . Remove ( path . Length - 1 ) ;
296297
297- return new PathBoxItem
298- {
299- Title = component ,
300- Path = path
301- } ;
298+ title = component ;
302299 }
300+
301+ return new PathBoxItem ( )
302+ {
303+ Title = title ,
304+ Path = path
305+ } ;
303306 }
304307
305308 private static string GetPathWithoutEnvironmentVariable ( string path )
@@ -323,6 +326,9 @@ private static string ResolvePath(string path, bool isFtp)
323326 if ( path . StartsWith ( "Home" ) )
324327 return "Home" ;
325328
329+ if ( ShellStorageFolder . IsShellPath ( path ) )
330+ return ShellHelpers . ResolveShellPath ( path ) ;
331+
326332 var pathBuilder = new StringBuilder ( path ) ;
327333 var lastPathIndex = path . Length - 1 ;
328334 var separatorChar = isFtp || path . Contains ( '/' , StringComparison . Ordinal ) ? '/' : '\\ ' ;
@@ -333,7 +339,7 @@ private static string ResolvePath(string path, bool isFtp)
333339 if ( pathBuilder [ i ] is not '?' &&
334340 pathBuilder [ i ] != Path . DirectorySeparatorChar &&
335341 pathBuilder [ i ] != Path . AltDirectorySeparatorChar &&
336- i != lastIndex )
342+ i != lastPathIndex )
337343 continue ;
338344
339345 if ( lastIndex == i )
0 commit comments