@@ -80,12 +80,6 @@ public function __construct(
8080 public function scanFileById (int $ fileId ): VaasVerdict {
8181 $ node = $ this ->fileService ->getNodeFromFileId ($ fileId );
8282 $ filePath = $ node ->getStorage ()->getLocalFile ($ node ->getInternalPath ());
83- if (file_exists ($ filePath ) === false ) {
84- $ this ->logger ->debug ('Could not Scan File. File does not exist: ' . $ filePath );
85- }
86- if (is_dir ($ filePath )) {
87- $ this ->logger ->debug ('Could not Scan File. File is a directory: ' . $ filePath );
88- }
8983 if (self ::isFileTooLargeToScan ($ filePath )) {
9084 $ this ->tagService ->setTag ($ fileId , TagService::WONT_SCAN , silent: true );
9185 throw new EntityTooLargeException ('File is too large ' );
@@ -127,7 +121,6 @@ public function isFileTooLargeToScan(string $path): bool {
127121 */
128122 public function isAllowedToScan (string $ filePath ): bool {
129123 $ doNotScanThis = $ this ->getDoNotScanThis ();
130- $ this ->logger ->debug ('doNotScanThis: ' . implode (', ' , $ doNotScanThis ));
131124 foreach ($ doNotScanThis as $ doNotScanThisItem ) {
132125 if (str_contains (strtolower ($ filePath ), strtolower ($ doNotScanThisItem ))) {
133126 return false ;
@@ -137,7 +130,6 @@ public function isAllowedToScan(string $filePath): bool {
137130 if (count ($ scanOnlyThis ) === 0 ) {
138131 return true ;
139132 }
140- $ this ->logger ->debug ('scanOnlyThis: ' . implode (', ' , $ scanOnlyThis ));
141133 foreach ($ scanOnlyThis as $ scanOnlyThisItem ) {
142134 if (str_contains (strtolower ($ filePath ), strtolower ($ scanOnlyThisItem ))) {
143135 return true ;
0 commit comments