From f2b81313c5a10d61fc2f12dbe4cc164cddfba7d7 Mon Sep 17 00:00:00 2001 From: jkrone Date: Thu, 25 Jan 2018 10:46:43 -0500 Subject: [PATCH 1/2] make depth dynamic to enable recursive 'ipfs ls' --- src/ls.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ls.js b/src/ls.js index 78dc4d5bd..e200f2644 100644 --- a/src/ls.js +++ b/src/ls.js @@ -36,12 +36,12 @@ module.exports = (arg) => { } result = result.map((link) => ({ - depth: 1, name: link.Name, path: args + '/' + link.Name, size: link.Size, hash: link.Hash, - type: typeOf(link) + type: typeOf(link), + depth: link.Depth })) callback(null, result) From db672ed59104f904649f38da728d41f8fc2111c9 Mon Sep 17 00:00:00 2001 From: jkrone Date: Mon, 19 Feb 2018 15:10:22 -0500 Subject: [PATCH 2/2] fallback to 1 depth --- src/ls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ls.js b/src/ls.js index e200f2644..2ae92483c 100644 --- a/src/ls.js +++ b/src/ls.js @@ -41,7 +41,7 @@ module.exports = (arg) => { size: link.Size, hash: link.Hash, type: typeOf(link), - depth: link.Depth + depth: link.Depth || 1 })) callback(null, result)