Commit 4fd3c54 1 parent fd76781 commit 4fd3c54 Copy full SHA for 4fd3c54
File tree 3 files changed +12
-5
lines changed
3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,7 @@ Users appreciate release notes as you update your extension.
21
21
22
22
Initial release
23
23
24
+ ### 0.5.1
25
+
26
+ Fix: wrong directory path
27
+
Original file line number Diff line number Diff line change 2
2
"name" : " csak-ext-timer" ,
3
3
"displayName" : " csak-ext-timer" ,
4
4
"description" : " If you want to know what time was spent for projects" ,
5
- "version" : " 0.5.0 " ,
5
+ "version" : " 0.5.1 " ,
6
6
"publisher" : " csakaszamok" ,
7
7
"engines" : {
8
8
"vscode" : " ^1.18.0"
Original file line number Diff line number Diff line change @@ -185,19 +185,22 @@ class WordCounterController {
185
185
console . log ( 'Start at' , this . starttime . toLocaleTimeString ( ) ) ;
186
186
this . _wordCounter = wordCounter ;
187
187
188
+
189
+ //console.log(vscode.workspace.workspaceFolders.length);
190
+
188
191
if ( ! vscode . window . activeTextEditor || ! vscode . window . activeTextEditor . document ) {
189
192
return ;
190
193
}
191
194
//set logfile path
192
- var s = path . normalize ( vscode . window . activeTextEditor . document . fileName ) ;
193
- var p = path . dirname ( s ) ;
195
+ // var s = path.normalize(vscode.window.activeTextEditor.document.fileName);
196
+ var p = vscode . workspace . workspaceFolders [ 0 ] . uri . fsPath
194
197
var folderpath = p . split ( '\\' ) . pop ( ) ;
195
198
if ( folderpath != '.vscode' ) {
196
199
folderpath = p + '/.vscode'
197
200
} else {
198
201
folderpath = p ;
199
202
}
200
- if ( ! fs . existsSync ( folderpath ) ) {
203
+ if ( ! fs . existsSync ( folderpath ) ) {
201
204
fs . mkdirSync ( folderpath ) ;
202
205
}
203
206
this . logfile = folderpath + '/csak-timelog.json' ;
@@ -255,7 +258,7 @@ class WordCounterController {
255
258
this . startTimer ( ) ;
256
259
}
257
260
//this._wordCounter.updateWordCount(this.getElapsedTime());
258
-
261
+
259
262
}
260
263
}
261
264
You can’t perform that action at this time.
0 commit comments