Skip to content

Commit 9d611f1

Browse files
Merge pull request #463 from lukecotter/bug-save-file-exception-windows
bug: save file exception windows
2 parents 48f0565 + f011e37 commit 9d611f1

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.12.1] - 2023-12-11
9+
10+
### Fixed
11+
12+
- Unable to Save file when exporting CSV from Analysis or Database ([#461][#461])
13+
814
## [1.12.0] - 2023-12-05
915

1016
### Added
@@ -306,6 +312,10 @@ Skipped due to adopting odd numbering for pre releases and even number for relea
306312
- Add explorer menu item
307313
- Provide more information when selecting log to download
308314

315+
<!-- v1.12.1 -->
316+
317+
[#461]: https://github.com/certinia/debug-log-analyzer/issues/461
318+
309319
<!-- v1.12.0 -->
310320

311321
[#311]: https://github.com/certinia/debug-log-analyzer/issues/311

lana/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lana",
33
"displayName": "Apex Log Analyzer",
4-
"version": "1.12.0",
4+
"version": "1.12.1",
55
"description": "Analyzer for Salesforce debug logs - Visualize code execution via a Flame graph and identify performance and SOQL/DML problems via Method and Database analysis",
66
"keywords": [
77
"apex",

lana/src/commands/LogView.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,16 @@ export class LogView {
9696
if (request.text && request.options?.defaultUri) {
9797
const defaultWorkspace = (workspace.workspaceFolders || [])[0];
9898
const defaultDir = defaultWorkspace?.uri.path || homedir();
99-
vscWindow
100-
.showSaveDialog({
101-
defaultUri: Uri.file(join(defaultDir, request.options.defaultUri)),
102-
})
103-
.then((fileInfos) => {
104-
if (fileInfos && request.text) {
105-
writeFile(fileInfos.path, request.text).catch((error) => {
106-
const msg = error instanceof Error ? error.message : String(error);
107-
vscWindow.showErrorMessage(`Unable to save file: ${msg}`);
108-
});
109-
}
99+
const destinationFile = await vscWindow.showSaveDialog({
100+
defaultUri: Uri.file(join(defaultDir, request.options.defaultUri)),
101+
});
102+
103+
if (destinationFile) {
104+
writeFile(destinationFile.fsPath, request.text).catch((error) => {
105+
const msg = error instanceof Error ? error.message : String(error);
106+
vscWindow.showErrorMessage(`Unable to save file: ${msg}`);
110107
});
108+
}
111109
}
112110
break;
113111
}

0 commit comments

Comments
 (0)