Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

fix dirDialog: incorrect result if path too short #25

Conversation

philenius
Copy link
Contributor

This pull request is related to issue #20 .

Platform: Windows 10
Summary: if a user selects the root of a disk / USB device (file picker), then the returned file path is incorrect. Example: user selects the root of disk C C:\ but the return value is C:\l Disk (C:). This bug seems to be related to the length of the file path which the user had selected. If the user selects a child directory (not the root of a disk/device), then the correct file path is returned. I tested this change on Windows 10 64 Bit.

For an explanation please read the comment by @ncruces: #20 (comment)

If the selected directory / path on Windows is too short (shorter than
the displayName?), then the function dirDialog() returned an incorrect
path. Example: if the user selected "C:\" (root dir of disk), then the
returned path is "C:\l Disk (C:)". The same goes for USB devices.
@gen2brain gen2brain merged commit f512297 into gen2brain:master Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants