Skip to content

Commit

Permalink
Added the un/serialization of the property 'contentUid' for the 'Virt…
Browse files Browse the repository at this point in the history
…ualStoredFile' class
  • Loading branch information
AdrienCastex committed Jun 4, 2017
1 parent c3eb727 commit 62556f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/manager/VirtualStoredFSManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ var VirtualStoredFSManager = (function () {
result.name = resource.name;
if (resource.len)
result.len = resource.len;
if (resource.contentUid)
result.contentUid = resource.contentUid;
return result;
};
VirtualStoredFSManager.prototype.unserialize = function (data, obj) {
Expand All @@ -130,8 +132,8 @@ var VirtualStoredFSManager = (function () {
}
if (obj.type.isFile) {
var rs = new VirtualStoredFile_1.VirtualStoredFile(data.name, null, this);
if (data.len)
rs.len = data.len;
rs.len = data.len;
rs.contentUid = data.contentUid;
rs.dateCreation = data.dateCreation;
rs.dateLastModified = data.dateLastModified;
rs.lockBag.locks = data.locks;
Expand Down
6 changes: 4 additions & 2 deletions src/manager/VirtualStoredFSManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export class VirtualStoredFSManager implements FSManager
result.name = resource.name;
if(resource.len)
result.len = resource.len;
if(resource.contentUid)
result.contentUid = resource.contentUid;

return result;
}
Expand All @@ -177,8 +179,8 @@ export class VirtualStoredFSManager implements FSManager
if(obj.type.isFile)
{
const rs = new VirtualStoredFile(data.name, null, this);
if(data.len)
rs.len = data.len;
rs.len = data.len;
rs.contentUid = data.contentUid;
rs.dateCreation = data.dateCreation;
rs.dateLastModified = data.dateLastModified;
rs.lockBag.locks = data.locks;
Expand Down

0 comments on commit 62556f5

Please sign in to comment.