You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "arosien (via GitHub)" <gi...@apache.org> on 2023/03/20 16:37:53 UTC

[GitHub] [daffodil-vscode] arosien commented on a diff in pull request #502: fix save over original file (fixes #501)

arosien commented on code in PR #502:
URL: https://github.com/apache/daffodil-vscode/pull/502#discussion_r1142407225


##########
src/omega_edit/dataEditWebView.ts:
##########
@@ -334,25 +304,17 @@ export class DataEditWebView implements vscode.Disposable {
           })
           .then(async (uri) => {
             if (uri && uri.fsPath) {
-              if (uri.path === this.fileToEdit) {
-                await this.saveSession(this.omegaSessionId, true).catch(() => {
-                  vscode.window.showErrorMessage('Failed to save')
+              await omegaEditSession
+                .saveSession(this.omegaSessionId, uri.path, true)
+                .then(async (fp) => {
+                  vscode.window.showInformationMessage(`Saved to file: ${fp}`)

Review Comment:
   Concern: I'll need to load this in a real editor, but I'm not sure `saveSession` returns the file path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org