src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts/SimpleFileDialog/tryUpdateItems
class SimpleFileDialog:	private async tryUpdateItems(value: string, valueUri: URI): Promise<UpdateResult> {
		if ((value.length > 0) && (value[0] === '~')) {
			const newDir = this.tildaReplace(value);
			return await this.updateItems(newDir, true) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
		} else if (value === '\\') {
			valueUri = this.root(this.currentFolder);
			value = this.pathFromUri(valueUri);
			return await this.updateItems(valueUri, true) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
		} else if (!resources.extUriIgnorePathCase.isEqual(this.currentFolder, valueUri) && (this.endsWithSlash(value) || (!resources.extUriIgnorePathCase.isEqual(this.currentFolder, resources.dirname(valueUri)) && resources.extUriIgnorePathCase.isEqualOrParent(this.currentFolder, resources.dirname(valueUri))))) {
			let stat: IFileStatWithPartialMetadata | undefined;
			try {
				stat = await this.fileService.stat(valueUri);
			} catch (e) {
				// do nothing
			}
			if (stat && stat.isDirectory && (resources.basename(valueUri) !== '.') && this.endsWithSlash(value)) {
				valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat);
				return await this.updateItems(valueUri) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
			} else if (this.endsWithSlash(value)) {
				// The input box contains a path that doesn't exist on the system.
				this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.');
				// Save this bad path. It can take too long to a stat on every user entered character, but once a user enters a bad path they are likely
				// to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it.
				this.badPath = value;
				return UpdateResult.InvalidPath;
			} else {
				let inputUriDirname = resources.dirname(valueUri);
				const currentFolderWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(this.currentFolder));
				const inputUriDirnameWithoutSep = resources.removeTrailingPathSeparator(resources.addTrailingPathSeparator(inputUriDirname));
				if (!resources.extUriIgnorePathCase.isEqual(currentFolderWithoutSep, inputUriDirnameWithoutSep)
					&& (!/^[a-zA-Z]:$/.test(this.filePickBox.value)
						|| !equalsIgnoreCase(this.pathFromUri(this.currentFolder).substring(0, this.filePickBox.value.length), this.filePickBox.value))) {
					let statWithoutTrailing: IFileStatWithPartialMetadata | undefined;
					try {
						statWithoutTrailing = await this.fileService.stat(inputUriDirname);
					} catch (e) {
						// do nothing
					}
					if (statWithoutTrailing && statWithoutTrailing.isDirectory) {
						this.badPath = undefined;
						inputUriDirname = this.tryAddTrailingSeparatorToDirectory(inputUriDirname, statWithoutTrailing);
						return await this.updateItems(inputUriDirname, false, resources.basename(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
					}
				}
			}
		}
		this.badPath = undefined;
		return UpdateResult.NotUpdated;
	}