mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix resultSerializer to correctly check returned file picker path (#6713)
This commit is contained in:
@@ -130,7 +130,7 @@ export class ResultSerializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private promptForFilepath(format: SaveFormat, resourceUri: string): Thenable<string> {
|
private promptForFilepath(format: SaveFormat, resourceUri: string): Thenable<string | undefined> {
|
||||||
let filepathPlaceHolder = prevSavePath ? path.dirname(prevSavePath) : resolveCurrentDirectory(resourceUri, this.rootPath);
|
let filepathPlaceHolder = prevSavePath ? path.dirname(prevSavePath) : resolveCurrentDirectory(resourceUri, this.rootPath);
|
||||||
if (filepathPlaceHolder) {
|
if (filepathPlaceHolder) {
|
||||||
filepathPlaceHolder = path.join(filepathPlaceHolder, this.getResultsDefaultFilename(format));
|
filepathPlaceHolder = path.join(filepathPlaceHolder, this.getResultsDefaultFilename(format));
|
||||||
@@ -141,8 +141,11 @@ export class ResultSerializer {
|
|||||||
defaultUri: filepathPlaceHolder ? URI.file(filepathPlaceHolder) : undefined,
|
defaultUri: filepathPlaceHolder ? URI.file(filepathPlaceHolder) : undefined,
|
||||||
filters: this.getResultsFileExtension(format)
|
filters: this.getResultsFileExtension(format)
|
||||||
}).then(filePath => {
|
}).then(filePath => {
|
||||||
prevSavePath = filePath.fsPath;
|
if (filePath) {
|
||||||
return filePath.fsPath;
|
prevSavePath = filePath.fsPath;
|
||||||
|
return filePath.fsPath;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user