@@ -104,7 +104,7 @@ public ListedItem CurrentFolder
104
104
105
105
public string WorkingDirectory { get ; private set ; }
106
106
107
- private StorageFolderWithPath currentStorageFolder ;
107
+ private StorageFolderWithPath ? currentStorageFolder ;
108
108
private StorageFolderWithPath workingRoot ;
109
109
110
110
public delegate void WorkingDirectoryModifiedEventHandler ( object sender , WorkingDirectoryModifiedEventArgs e ) ;
@@ -1400,7 +1400,7 @@ public async Task EnumerateItemsFromSpecialFolderAsync(string path)
1400
1400
{
1401
1401
var isFtp = FtpHelpers . IsFtpPath ( path ) ;
1402
1402
1403
- CurrentFolder = new ListedItem ( null )
1403
+ CurrentFolder = new ListedItem ( null ! )
1404
1404
{
1405
1405
PrimaryItemAttribute = StorageItemTypes . Folder ,
1406
1406
ItemPropertiesInitialized = true ,
@@ -1569,22 +1569,22 @@ await DialogDisplayHelper.ShowDialogAsync(
1569
1569
if ( enumFromStorageFolder )
1570
1570
{
1571
1571
var basicProps = await rootFolder ? . GetBasicPropertiesAsync ( ) ;
1572
- var currentFolder = library ?? new ListedItem ( rootFolder . FolderRelativeId )
1572
+ var currentFolder = library ?? new ListedItem ( rootFolder ? . FolderRelativeId ?? string . Empty )
1573
1573
{
1574
1574
PrimaryItemAttribute = StorageItemTypes . Folder ,
1575
1575
ItemPropertiesInitialized = true ,
1576
- ItemNameRaw = rootFolder . DisplayName ,
1576
+ ItemNameRaw = rootFolder ? . DisplayName ?? string . Empty ,
1577
1577
ItemDateModifiedReal = basicProps . DateModified ,
1578
- ItemType = rootFolder . DisplayType ,
1578
+ ItemType = rootFolder ? . DisplayType ?? string . Empty ,
1579
1579
FileImage = null ,
1580
1580
LoadFileIcon = false ,
1581
- ItemPath = string . IsNullOrEmpty ( rootFolder . Path ) ? currentStorageFolder . Path : rootFolder . Path ,
1581
+ ItemPath = string . IsNullOrEmpty ( rootFolder ? . Path ) ? currentStorageFolder ? . Path ?? string . Empty : rootFolder . Path ,
1582
1582
FileSize = null ,
1583
1583
FileSizeBytes = 0 ,
1584
1584
} ;
1585
1585
1586
1586
if ( library is null )
1587
- currentFolder . ItemDateCreatedReal = rootFolder . DateCreated ;
1587
+ currentFolder . ItemDateCreatedReal = rootFolder ? . DateCreated ?? DateTimeOffset . Now ;
1588
1588
1589
1589
CurrentFolder = currentFolder ;
1590
1590
await EnumFromStorageFolderAsync ( path , rootFolder , currentStorageFolder , cancellationToken ) ;
0 commit comments