Skynet export fixes
This commit is contained in:
@@ -70,7 +70,13 @@ const _createTreeNodes = fileList => {
|
||||
};
|
||||
|
||||
const addNode = obj => {
|
||||
const fullPath = path.join(obj.directory, obj.filename).replace(/\\/g, '/');
|
||||
let fullPath;
|
||||
const idx = obj.skylink.indexOf('/');
|
||||
if (idx > -1) {
|
||||
fullPath = path.join(obj.directory, obj.skylink.substr(idx + 1)).replace(/\\/g, '/');
|
||||
} else {
|
||||
fullPath = path.join(obj.directory, obj.filename).replace(/\\/g, '/');
|
||||
}
|
||||
const pathParts = fullPath.replace(/^\/|\/$/g, '').split('/');
|
||||
let ptr = tree;
|
||||
for (let i = 0; i < pathParts.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user