Skip to content

Commit

Permalink
Fixed content un/serialization for virtual files
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 30, 2017
1 parent d96ea6d commit 0a41414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/manager/VirtualFSManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var VirtualFSManager = (function () {
if (obj.type.isFile) {
var rs = new VirtualFile_1.VirtualFile(data.name, null, this);
if (data.content) {
rs.content = data.content;
rs.content = data.content ? data.content.map(function (a) { return new Buffer(a); }) : data.content;
rs.len = data.len;
}
rs.dateCreation = data.dateCreation;
Expand Down
2 changes: 1 addition & 1 deletion src/manager/VirtualFSManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class VirtualFSManager implements FSManager
const rs = new VirtualFile(data.name, null, this);
if(data.content)
{
rs.content = data.content;
rs.content = data.content ? data.content.map((a) => new Buffer(a)) : data.content;
rs.len = data.len;
}
rs.dateCreation = data.dateCreation;
Expand Down

0 comments on commit 0a41414

Please sign in to comment.