Skip to content

Commit 0258029

Browse files
committed
Repo path windows fix
1 parent d38ed19 commit 0258029

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/ScreenHelper.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const { dirname } = require('path');
12
class ScreenHelper {
23
static async alertError(context, message) {
34
return await context.app.alert('Erro!', message);
@@ -10,14 +11,8 @@ class ScreenHelper {
1011
);
1112
const path = await context.app.showSaveDialog({defaultPath: options.workspaceName});
1213

13-
return normalizePath(path);
14+
return dirname(path);
1415
}
1516
}
1617

17-
const normalizePath = (path) => {
18-
if (path == null || path == 'undefined') return null;
19-
20-
return path.substr(0, path.lastIndexOf('/'));
21-
};
22-
2318
module.exports = ScreenHelper;

0 commit comments

Comments
 (0)