nvda
fe94cf78 - Explain the missing backslash when a portable copy path is a bare drive (#21045)

Commit
20 days ago
Explain the missing backslash when a portable copy path is a bare drive (#21045) Link to issue number: Fixes #20159 Summary of the issue: In Create Portable NVDA, a destination that is a drive letter with no backslash after it, such as D:, is rejected with the general "Please specify the absolute path" error. D: refers to the current folder on that drive rather than its root, so rejecting it is correct, but the message doesn't say why, and its own example, C:, is itself a bare drive that gets the same error. Description of user facing changes: A destination with a drive letter but no backslash after it (D:, D:folder) now gets its own error: the drive letter must be followed by a backslash, with D:\ for the root of the drive and D:\folder for a folder on it. The general error's example drive is now C:\ instead of C:. Description of developer facing changes: None. Description of development approach: Following the review on #20446, the destination checks moved out of PortableCreaterDialog.onCreatePortable into a new _validatePortableDirectory helper in gui/installerGui.py. It returns the expanded absolute path, or raises DisplayableError; onCreatePortable shows it with displayError. A bare drive is detected with os.path.splitroot: a drive with no root. UNC paths are absolute and pass as before. I also added a Bug Fixes entry to user_docs/en/changes.md, and my name to the copyright headers of the two files I changed, as projectDocs/dev/copyrightHeaders.md asks.
Author
Parents
Loading