You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the folder picker if you attempt to select a folder which you have deleted using the picker window, it will allow you to choose that folder even though it no longer exists, but then throws an unhandled ArgumentException causing the application to crash.
To Reproduce
Open folder picker window using OpenFolderPickerAsync
Select an existing folder or create a new one using the picker window
Delete the folder
Click Select Folder
Expected behavior
A dialog message is shown stating that the path does not exist
Avalonia version
11.2.0
OS
Windows
Additional context
OpenFilePickerAsync behaves similarly, but instead of throwing an exception it just silently fails to return a file. Which is also inconsistent with what happens when you try to add a file which does not exist.
Dialog window which shows in the latter but not in the former:
Stack trace excerpt:
System.ArgumentException: Directory must exist (Parameter 'fileSystemInfo')
at Avalonia.Platform.Storage.FileIO.BclStorageItem..ctor(FileSystemInfo fileSystemInfo)
at Avalonia.Platform.Storage.FileIO.BclStorageFolder..ctor(DirectoryInfo directoryInfo)
at Avalonia.Win32.Win32StorageProvider.<>c.<OpenFolderPickerAsync>b__10_0(String f)
at Avalonia.Win32.Win32StorageProvider.<>c__DisplayClass13_0`1.<ShowFilePicker>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Avalonia.Win32.Win32StorageProvider.OpenFolderPickerAsync(FolderPickerOpenOptions options)
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the folder picker if you attempt to select a folder which you have deleted using the picker window, it will allow you to choose that folder even though it no longer exists, but then throws an unhandled
ArgumentException
causing the application to crash.To Reproduce
OpenFolderPickerAsync
Select Folder
Expected behavior
Avalonia version
11.2.0
OS
Windows
Additional context
OpenFilePickerAsync
behaves similarly, but instead of throwing an exception it just silently fails to return a file. Which is also inconsistent with what happens when you try to add a file which does not exist.Dialog window which shows in the latter but not in the former:
Stack trace excerpt:
The text was updated successfully, but these errors were encountered: