mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Consistently capitalize drive letter for Windows
This commit is contained in:
parent
b3afe73949
commit
e0483585b8
1 changed files with 10 additions and 1 deletions
|
@ -144,7 +144,16 @@ ModalWindow {
|
|||
leftMargin: hifi.dimensions.contentSpacing.x
|
||||
right: parent.right
|
||||
}
|
||||
onLastValidFolderChanged: text = lastValidFolder;
|
||||
|
||||
function capitalizeDrive(path) {
|
||||
// Consistently capitalize drive letter for Windows.
|
||||
if (/[a-zA-Z]:/.test(path)) {
|
||||
return path.charAt(0).toUpperCase() + path.slice(1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
onLastValidFolderChanged: text = capitalizeDrive(lastValidFolder);
|
||||
|
||||
// FIXME add support auto-completion
|
||||
onAccepted: {
|
||||
|
|
Loading…
Reference in a new issue