File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -200,9 +200,12 @@ class TempSvnFs implements FileSystemProvider, Disposable {
200200 const hash = crypto . createHash ( "md5" ) ;
201201 const filePathHash = hash . update ( svnUri . path ) . digest ( "hex" ) ;
202202 const encoding = configuration . get < string > ( "default.encoding" ) ;
203+ let contentBuffer : Buffer ;
203204
204205 if ( encoding ) {
205- content = iconv . encode ( content , encoding ) . toString ( ) ;
206+ contentBuffer = iconv . encode ( content , encoding ) ;
207+ } else {
208+ contentBuffer = Buffer . from ( content ) ;
206209 }
207210
208211 if ( ! this . _root . entries . has ( filePathHash ) ) {
@@ -211,7 +214,7 @@ class TempSvnFs implements FileSystemProvider, Disposable {
211214
212215 const uri = Uri . parse ( `tempsvnfs:/${ filePathHash } /${ fname } ` , true ) ;
213216
214- this . writeFile ( uri , Buffer . from ( content ) , {
217+ this . writeFile ( uri , contentBuffer , {
215218 create : true ,
216219 overwrite : true
217220 } ) ;
You can’t perform that action at this time.
0 commit comments