File tree 1 file changed +5
-2
lines changed
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 {
200
200
const hash = crypto . createHash ( "md5" ) ;
201
201
const filePathHash = hash . update ( svnUri . path ) . digest ( "hex" ) ;
202
202
const encoding = configuration . get < string > ( "default.encoding" ) ;
203
+ let contentBuffer : Buffer ;
203
204
204
205
if ( encoding ) {
205
- content = iconv . encode ( content , encoding ) . toString ( ) ;
206
+ contentBuffer = iconv . encode ( content , encoding ) ;
207
+ } else {
208
+ contentBuffer = Buffer . from ( content ) ;
206
209
}
207
210
208
211
if ( ! this . _root . entries . has ( filePathHash ) ) {
@@ -211,7 +214,7 @@ class TempSvnFs implements FileSystemProvider, Disposable {
211
214
212
215
const uri = Uri . parse ( `tempsvnfs:/${ filePathHash } /${ fname } ` , true ) ;
213
216
214
- this . writeFile ( uri , Buffer . from ( content ) , {
217
+ this . writeFile ( uri , contentBuffer , {
215
218
create : true ,
216
219
overwrite : true
217
220
} ) ;
You can’t perform that action at this time.
0 commit comments