diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-25 11:05:06 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-25 11:05:06 +0200 |
commit | 814b6ff489bc1f0bfd03db6409d49185e8c7b93e (patch) | |
tree | dd00993c84667e222d4699e8e1ac933b853b9a3a /lib/json/encodeFile.js | |
parent | 3aa17ab1f4a25a9bcfd8babdcf98a37ac6c2496c (diff) | |
download | gitbook-814b6ff489bc1f0bfd03db6409d49185e8c7b93e.zip gitbook-814b6ff489bc1f0bfd03db6409d49185e8c7b93e.tar.gz gitbook-814b6ff489bc1f0bfd03db6409d49185e8c7b93e.tar.bz2 |
Complete json format
Diffstat (limited to 'lib/json/encodeFile.js')
-rw-r--r-- | lib/json/encodeFile.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/json/encodeFile.js b/lib/json/encodeFile.js index 03b3450..d2c9e8a 100644 --- a/lib/json/encodeFile.js +++ b/lib/json/encodeFile.js @@ -6,8 +6,13 @@ @return {Object} */ function encodeFileToJson(file) { + var filePath = file.getPath(); + if (!filePath) { + return undefined; + } + return { - path: file.getPath(), + path: filePath, mtime: file.getMTime(), type: file.getType() }; |