@@ -3,7 +3,7 @@ import { inject, injectable } from 'inversify';
3
3
import * as os from 'os' ;
4
4
import * as path from 'path' ;
5
5
import { Uri } from 'vscode' ;
6
- import { traceError } from '../../common/logger' ;
6
+ import { traceError , traceInfo } from '../../common/logger' ;
7
7
import { isFileNotFoundError } from '../../common/platform/errors' ;
8
8
import { IFileSystem } from '../../common/platform/types' ;
9
9
import { IExtensionContext } from '../../common/types' ;
@@ -13,6 +13,7 @@ import { IDigestStorage } from '../types';
13
13
export class DigestStorage implements IDigestStorage {
14
14
public readonly key : Promise < string > ;
15
15
private digestDir : Promise < string > ;
16
+ private loggedFileLocations = new Set ( ) ;
16
17
17
18
constructor (
18
19
@inject ( IFileSystem ) private fs : IFileSystem ,
@@ -26,6 +27,10 @@ export class DigestStorage implements IDigestStorage {
26
27
const fileLocation = await this . getFileLocation ( uri ) ;
27
28
// Since the signature is a hex digest, the character 'z' is being used to delimit the start and end of a single digest
28
29
await this . fs . appendFile ( fileLocation , `z${ signature } z\n` ) ;
30
+ if ( ! this . loggedFileLocations . has ( fileLocation ) ) {
31
+ traceInfo ( `Wrote trust for ${ uri . toString ( ) } to ${ fileLocation } ` ) ;
32
+ this . loggedFileLocations . add ( fileLocation ) ;
33
+ }
29
34
}
30
35
31
36
public async containsDigest ( uri : Uri , signature : string ) {
0 commit comments