Fix to stop scanning when power off
[platform/core/multimedia/media-server.git] / src / scanner / media-scanner-scan.c
index 25489d2..a455736 100644 (file)
@@ -69,7 +69,7 @@ static int __msc_dir_scan(sqlite3 *handle, const char *storage_id, char *start_p
                if (__msc_is_power_off()) {
                        ret = MS_MEDIA_ERR_SCANNER_FORCE_STOP;
                        MS_SAFE_FREE(current_path);
-                       continue;
+                       break;
                }
 
                if (ms_check_scan_ignore(current_path, uid) != MS_MEDIA_ERR_NONE) {