Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFolderPickerAsync is unable to get the path to the root of the drive #17940

Open
howzew opened this issue Jan 10, 2025 · 0 comments
Open
Labels

Comments

@howzew
Copy link

howzew commented Jan 10, 2025

Describe the bug

In Windows, when accessing a non-root directory, the path information can be successfully retrieved using Path.LocalPath.

QQ20250109-141555

However, when accessing the root directory of a drive, LocalPath cannot retrieve the path.

QQ20250109-140845

Is it possible to add the LocalPath method to the root directory?

To Reproduce

        public async Task<IStorageFolder?> OpenFolderAsync()
        {
            var folder = await _target.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions()
            {
                Title = "title",
                AllowMultiple = false,
            });

            return folder.Count >= 1 ? folder[0] : null;
        }

Expected behavior

No response

Avalonia version

11.2.3

OS

Windows

Additional context

No response

@howzew howzew added the bug label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant