diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-07-31 20:25:13 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-07-31 20:25:13 +0200 |
commit | 6e2ce76223eb6f0dcd1ef34e086fa59eb5fb3f8b (patch) | |
tree | ade7c7cec1c2c8dd986e31d2f9f582e4bcf1c80f /apps/media/lib_scanner.php | |
parent | 14f7daf53c90f14e8fa600926ae19b3e44320158 (diff) | |
download | nextcloud-server-6e2ce76223eb6f0dcd1ef34e086fa59eb5fb3f8b.tar.gz nextcloud-server-6e2ce76223eb6f0dcd1ef34e086fa59eb5fb3f8b.zip |
use db transitions for collection scanner
Diffstat (limited to 'apps/media/lib_scanner.php')
-rw-r--r-- | apps/media/lib_scanner.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php index e3cb2f051ce..f788562fdbf 100644 --- a/apps/media/lib_scanner.php +++ b/apps/media/lib_scanner.php @@ -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; } |