We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d38ed19 commit 0258029Copy full SHA for 0258029
src/ScreenHelper.js
@@ -1,3 +1,4 @@
1
+const { dirname } = require('path');
2
class ScreenHelper {
3
static async alertError(context, message) {
4
return await context.app.alert('Erro!', message);
@@ -10,14 +11,8 @@ class ScreenHelper {
10
11
);
12
const path = await context.app.showSaveDialog({defaultPath: options.workspaceName});
13
- return normalizePath(path);
14
+ return dirname(path);
15
}
16
17
-const normalizePath = (path) => {
18
- if (path == null || path == 'undefined') return null;
19
-
20
- return path.substr(0, path.lastIndexOf('/'));
21
-};
22
23
module.exports = ScreenHelper;
0 commit comments