@@ -14,8 +14,8 @@ import { Logger } from '../logger'
1414import { isNewOsSession } from '../utilities/osUtils'
1515import nodeFs from 'fs/promises'
1616import fs from '../fs/fs'
17- import * as CrashMonitoringConstants from './constants'
1817import { getLogger } from '../logger/logger'
18+ import { crashMonitoringDirName } from '../constants'
1919
2020const className = 'CrashMonitoring'
2121
@@ -375,7 +375,7 @@ export class FileSystemState {
375375 * Use {@link crashMonitoringStateFactory} to make an instance
376376 */
377377 constructor ( protected readonly deps : MementoStateDependencies ) {
378- this . stateDirPath = path . join ( this . deps . workDirPath , CrashMonitoringConstants . rootDir )
378+ this . stateDirPath = path . join ( this . deps . workDirPath , crashMonitoringDirName . root )
379379
380380 this . deps . devLogger ?. debug ( `crashMonitoring: pid: ${ this . deps . pid } ` )
381381 this . deps . devLogger ?. debug ( `crashMonitoring: sessionId: ${ this . deps . sessionId . slice ( 0 , 8 ) } -...` )
@@ -480,13 +480,13 @@ export class FileSystemState {
480480 return `${ ext . extHostPid } _${ ext . sessionId } `
481481 }
482482 private async runningExtsDir ( ) : Promise < string > {
483- const p = path . join ( this . stateDirPath , CrashMonitoringConstants . runningExtDir )
483+ const p = path . join ( this . stateDirPath , crashMonitoringDirName . running )
484484 // ensure the dir exists
485485 await withFailCtx ( 'ensureRunningExtsDir' , ( ) => fs . mkdir ( p ) )
486486 return p
487487 }
488488 private async shutdownExtsDir ( ) {
489- const p = path . join ( this . stateDirPath , CrashMonitoringConstants . shutdownExtDir )
489+ const p = path . join ( this . stateDirPath , crashMonitoringDirName . shutdown )
490490 // Since this runs in `deactivate()` it cannot use the VS Code FS api
491491 await withFailCtx ( 'ensureShutdownExtsDir' , ( ) => nodeFs . mkdir ( p , { recursive : true } ) )
492492 return p
0 commit comments