From: Michael Gapczynski Date: Tue, 26 Jun 2012 18:48:51 +0000 (-0400) Subject: Don't call getLocalFile() until you know it actually is music X-Git-Tag: v4.5.0beta1~74^2~49^2~155 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f55f13eebc3c3f15e74a7026a058ffaa5079f0e3;p=nextcloud-server.git Don't call getLocalFile() until you know it actually is music --- diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php index a8218c3a4d0..3c32879eeeb 100644 --- a/apps/media/lib_scanner.php +++ b/apps/media/lib_scanner.php @@ -61,7 +61,6 @@ class OC_MEDIA_SCANNER{ * @return boolean */ public static function scanFile($path){ - $file=OC_Filesystem::getLocalFile($path); if(!self::isMusic($path)){ return; } @@ -69,6 +68,7 @@ class OC_MEDIA_SCANNER{ self::$getID3=@new getID3(); self::$getID3->encoding='UTF-8'; } + $file=OC_Filesystem::getLocalFile($path); $data=@self::$getID3->analyze($file); getid3_lib::CopyTagsToComments($data); if(!isset($data['comments'])){