@@ -75,9 +75,11 @@ protected function streamNode(Streamer $streamer, NcNode $node, string $rootPath
7575 }
7676 $ streamer ->addFileFromStream ($ resource , $ filename , $ node ->getSize (), $ node ->getMTime ());
7777 } elseif ($ node instanceof NcFolder) {
78+ $ this ->logger ->info ('Creating new archive ' , ['filename ' => $ filename ]);
7879 $ streamer ->addEmptyDir ($ filename );
7980 $ content = $ node ->getDirectoryListing ();
8081 foreach ($ content as $ subNode ) {
82+ $ this ->logger ->info ('Adding new file ' , ['filename ' => $ filename , 'file ' => $ subNode ->getPath ()]);
8183 $ this ->streamNode ($ streamer , $ subNode , $ rootPath );
8284 }
8385 }
@@ -98,6 +100,8 @@ public function handleDownload(Request $request, Response $response): ?bool {
98100 return null ;
99101 }
100102
103+ $ this ->logger ->info ('Going to create an archive for folder ' , ['path ' => $ request ->getPath ()]);
104+
101105 $ query = $ request ->getQueryParameters ();
102106
103107 // Get accept header - or if set overwrite with accept GET-param
@@ -166,9 +170,11 @@ public function handleDownload(Request $request, Response $response): ?bool {
166170 $ streamer ->sendHeaders ($ archiveName );
167171 // For full folder downloads we also add the folder itself to the archive
168172 if (empty ($ files )) {
173+ $ this ->logger ->info ('Creating new archive ' , ['archiveName ' => $ archiveName , 'path ' => $ request ->getPath ()]);
169174 $ streamer ->addEmptyDir ($ archiveName );
170175 }
171176 foreach ($ content as $ node ) {
177+ $ this ->logger ->info ('Adding a new file in the archive ' , ['fileName ' => $ node ->getPath (), 'path ' => $ request ->getPath ()]);
172178 $ this ->streamNode ($ streamer , $ node , $ rootPath );
173179 }
174180 $ streamer ->finalize ();
0 commit comments