diff --git a/core/commands/unixfs/ls.go b/core/commands/unixfs/ls.go
index 3ed9d3733437555c3837f533118fd8317e06c378..9708800f91598ea4962e94f7e299243774ce3f47 100644
--- a/core/commands/unixfs/ls.go
+++ b/core/commands/unixfs/ls.go
@@ -94,7 +94,7 @@ directories, the child size is the IPFS link size.
 			case unixfspb.Data_Directory:
 				output[i].Links = make([]LsLink, len(merkleNode.Links))
 				for j, link := range merkleNode.Links {
-					getCtx, cancel := context.WithTimeout(context.TODO(), time.Minute)
+					getCtx, cancel := context.WithTimeout(ctx, time.Minute)
 					defer cancel()
 					link.Node, err = link.GetNode(getCtx, node.DAG)
 					if err != nil {