mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Look at folder readonly and locked before saving (#193825)
Cannot select a path outside the workspace to save the file Part of #191877
This commit is contained in:
@@ -828,6 +828,9 @@ export class SimpleFileDialog implements ISimpleFileDialog {
|
|||||||
} else if (!statDirname.isDirectory) {
|
} else if (!statDirname.isDirectory) {
|
||||||
this.filePickBox.validationMessage = nls.localize('remoteFileDialog.validateNonexistentDir', 'Please enter a path that exists.');
|
this.filePickBox.validationMessage = nls.localize('remoteFileDialog.validateNonexistentDir', 'Please enter a path that exists.');
|
||||||
return Promise.resolve(false);
|
return Promise.resolve(false);
|
||||||
|
} else if (statDirname.readonly || statDirname.locked) {
|
||||||
|
this.filePickBox.validationMessage = nls.localize('remoteFileDialog.validateReadonlyFolder', 'This folder cannot be used as a save destination. Please choose another folder');
|
||||||
|
return Promise.resolve(false);
|
||||||
}
|
}
|
||||||
} else { // open
|
} else { // open
|
||||||
if (!stat) {
|
if (!stat) {
|
||||||
|
|||||||
Reference in New Issue
Block a user