mirror of
https://github.com/nextcloud/server.git
synced 2026-06-15 11:41:20 -04:00
use db transitions for collection scanner
This commit is contained in:
parent
14f7daf53c
commit
6e2ce76223
1 changed files with 2 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ class OC_MEDIA_SCANNER{
|
|||
* @return int the number of songs found
|
||||
*/
|
||||
public static function scanFolder($path){
|
||||
OC_DB::beginTransaction();
|
||||
if (OC_Filesystem::is_dir($path)) {
|
||||
$songs=0;
|
||||
if ($dh = OC_Filesystem::opendir($path)) {
|
||||
|
|
@ -59,6 +60,7 @@ class OC_MEDIA_SCANNER{
|
|||
}else{
|
||||
$songs=0;
|
||||
}
|
||||
OC_DB::commit();
|
||||
return $songs;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue