pathchain 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/maker.js +1 -1
- package/package.json +1 -1
- package/updater.js +4 -4
package/maker.js
CHANGED
|
@@ -235,7 +235,7 @@ function path(text, elements, author, ancestor, format = 'MM DD YYYY HH:mm:SSS [
|
|
|
235
235
|
for (let i = 0; i < elements.length; i++) {
|
|
236
236
|
// link with no next and no prev is set with its target as the current element
|
|
237
237
|
const current_link = link(elements[i], "", "", author, "");
|
|
238
|
-
//
|
|
238
|
+
// only if this is not the first element
|
|
239
239
|
if (i > 0) {
|
|
240
240
|
updater.setLinkNext(prev_link, current_link);
|
|
241
241
|
updater.setLinkPrev(current_link, prev_link);
|
package/package.json
CHANGED
package/updater.js
CHANGED
|
@@ -64,8 +64,8 @@ function setLinkNext(xlink = '', xnextlink = '') {
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
// Ensure the directory exists and overwrite the link buffer to a file
|
|
67
|
-
checker.checkDir(xlink);
|
|
68
|
-
fs.writeFileSync(xlink
|
|
67
|
+
checker.checkDir(`files/${xlink}`);
|
|
68
|
+
fs.writeFileSync(`files/${xlink}`, buffer);
|
|
69
69
|
|
|
70
70
|
return xlink;
|
|
71
71
|
} catch (err) {
|
|
@@ -105,8 +105,8 @@ function setLinkPrev(xlink = '', xprevlink = '') {
|
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
// Ensure the directory exists and overwrite the link buffer to a file
|
|
108
|
-
checker.checkDir(xlink);
|
|
109
|
-
fs.writeFileSync(xlink
|
|
108
|
+
checker.checkDir(`files/${xlink}`);
|
|
109
|
+
fs.writeFileSync(`files/${xlink}`, buffer);
|
|
110
110
|
|
|
111
111
|
return xlink;
|
|
112
112
|
|