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:
Alex Ross
2023-09-25 09:59:29 +02:00
committed by GitHub
parent ca9da6c177
commit 39ad8c7bcd

View File

@@ -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) {