File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ interface IRawTmp {
7979 file ( options : tmpMod . Options , cb : TempCallback ) : void ;
8080}
8181
82- // The operations on tempporary files/directoryes used by the extension.
82+ // The operations on temporary files/directoryes used by the extension.
8383export class TempFileSystem {
8484 constructor (
8585 protected readonly raw : IRawTmp
@@ -351,7 +351,8 @@ export class FileSystemUtils implements IFileSystemUtils {
351351 try {
352352 tmpFile = await this . tmp . createFile ( '___vscpTest___' , dirname ) ;
353353 } catch {
354- await this . raw . stat ( dirname ) ; // fails if does not exist
354+ // Use a stat call to ensure the directory exists.
355+ await this . raw . stat ( dirname ) ;
355356 return true ;
356357 }
357358 tmpFile . dispose ( ) ;
@@ -370,7 +371,8 @@ export class FileSystemUtils implements IFileSystemUtils {
370371 }
371372}
372373
373- // We *could* use ICryptUtils, but it's a bit overkill.
374+ // We *could* use ICryptoUtils, but it's a bit overkill, issue tracked
375+ // in https://github.com/microsoft/vscode-python/issues/8438.
374376function getHashString ( data : string ) : string {
375377 const hash = createHash ( 'sha512' )
376378 . update ( data ) ;
Original file line number Diff line number Diff line change @@ -995,7 +995,7 @@ suite('FileSystem Utils', () => {
995995suite ( 'FileSystem - legacy aliases' , ( ) => {
996996 const fileToAppendTo = path . join ( __dirname , 'created_for_testing_dummy.txt' ) ;
997997 setup ( ( ) => {
998- cleanTestFiles ( ) ; // This smells like functional testing...
998+ cleanTestFiles ( ) ;
999999 } ) ;
10001000 teardown ( cleanTestFiles ) ;
10011001 function cleanTestFiles ( ) {
You can’t perform that action at this time.
0 commit comments