Skip to content
Snippets Groups Projects
Commit 6e2ce762 authored by Robin Appelman's avatar Robin Appelman
Browse files

use db transitions for collection scanner

parent 14f7daf5
Branches
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment