@@ -78,9 +78,11 @@ protected function streamNode(Streamer $streamer, NcNode $node, string $rootPath
7878 }
7979 $ streamer ->addFileFromStream ($ resource , $ filename , $ node ->getSize (), $ mtime );
8080 } elseif ($ node instanceof NcFolder) {
81+ $ this ->logger ->info ('Creating new archive ' , ['filename ' => $ filename ]);
8182 $ streamer ->addEmptyDir ($ filename , $ mtime );
8283 $ content = $ node ->getDirectoryListing ();
8384 foreach ($ content as $ subNode ) {
85+ $ this ->logger ->info ('Adding new file ' , ['filename ' => $ filename , 'file ' => $ subNode ->getPath ()]);
8486 $ this ->streamNode ($ streamer , $ subNode , $ rootPath );
8587 }
8688 }
@@ -101,6 +103,8 @@ public function handleDownload(Request $request, Response $response): ?bool {
101103 return null ;
102104 }
103105
106+ $ this ->logger ->info ('Going to create an archive for folder ' , ['path ' => $ request ->getPath ()]);
107+
104108 $ query = $ request ->getQueryParameters ();
105109
106110 // Get accept header - or if set overwrite with accept GET-param
@@ -169,9 +173,11 @@ public function handleDownload(Request $request, Response $response): ?bool {
169173 $ streamer ->sendHeaders ($ archiveName );
170174 // For full folder downloads we also add the folder itself to the archive
171175 if (empty ($ files )) {
176+ $ this ->logger ->info ('Creating new archive ' , ['archiveName ' => $ archiveName , 'path ' => $ request ->getPath ()]);
172177 $ streamer ->addEmptyDir ($ archiveName );
173178 }
174179 foreach ($ content as $ node ) {
180+ $ this ->logger ->info ('Adding a new file in the archive ' , ['fileName ' => $ node ->getPath (), 'path ' => $ request ->getPath ()]);
175181 $ this ->streamNode ($ streamer , $ node , $ rootPath );
176182 }
177183 $ streamer ->finalize ();
0 commit comments