Skip to content
Closed
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
15 changes: 11 additions & 4 deletions src/Files.App/Utils/Shell/ShellFolderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@
IsPinned = library.PinnedToNavigationPane,
};

var folders = library.Folders;
if (folders.Count > 0)
try
{
libraryItem.DefaultSaveFolder = SafetyExtensions.IgnoreExceptions(() => library.DefaultSaveFolder.FileSystemPath);
libraryItem.Folders = folders.Select(f => f.FileSystemPath).ToArray();
var folders = library.Folders;
if (folders.Count > 0)
{
libraryItem.DefaultSaveFolder = SafetyExtensions.IgnoreExceptions(() => library.DefaultSaveFolder.FileSystemPath);
libraryItem.Folders = folders.Select(f => f.FileSystemPath).ToArray();
}
}
catch (UnauthorizedAccessException ex)
{
App.Logger.LogWarning(ex, $"Access denied to library folders for {filePath}");

Check failure on line 37 in src/Files.App/Utils/Shell/ShellFolderExtensions.cs

View workflow job for this annotation

GitHub Actions / build (Debug, x64)

'ILogger' does not contain a definition for 'LogWarning' and no accessible extension method 'LogWarning' accepting a first argument of type 'ILogger' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 37 in src/Files.App/Utils/Shell/ShellFolderExtensions.cs

View workflow job for this annotation

GitHub Actions / build (Release, x64)

'ILogger' does not contain a definition for 'LogWarning' and no accessible extension method 'LogWarning' accepting a first argument of type 'ILogger' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 37 in src/Files.App/Utils/Shell/ShellFolderExtensions.cs

View workflow job for this annotation

GitHub Actions / build (Debug, arm64)

'ILogger' does not contain a definition for 'LogWarning' and no accessible extension method 'LogWarning' accepting a first argument of type 'ILogger' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 37 in src/Files.App/Utils/Shell/ShellFolderExtensions.cs

View workflow job for this annotation

GitHub Actions / build (Release, arm64)

'ILogger' does not contain a definition for 'LogWarning' and no accessible extension method 'LogWarning' accepting a first argument of type 'ILogger' could be found (are you missing a using directive or an assembly reference?)
}

return libraryItem;
Expand Down
Loading