char *_gl_get_camera_folder_path_internal(void);
char *_gl_get_camera_folder_path_external(void);
char *_gl_get_downloads_folder_path(void);
+ void _gl_get_total_space_required(void *data,
+ unsigned long long *total_space);
#ifdef __cplusplus
}
* 'move_album_id == NULL' is new album case,
* other move/save to some existed album.
*/
+
+ unsigned long long free_size =
+ gl_fs_get_free_space(GL_STORE_T_PHONE);
+ gl_dbg("Free space is %lld", free_size);
+
+ if (free_size == 0) {
+ gl_dbgW("Low memory.");
+ gl_popup_create_popup(ad, GL_POPUP_ALBUM_MEMORY_FULL,
+ GL_DEVICE_MEMORY_FULL);
+ goto GL_FAILED;
+ }
+ unsigned long long total_space = 0;
+ _gl_get_total_space_required(ad, &total_space);
+ gl_dbgW("Total space required is : %lld .", total_space);
+ if (total_space > free_size) {
+ gl_dbgW("Low memory.");
+ gl_popup_create_popup(ad, GL_POPUP_ALBUM_MEMORY_FULL,
+ GL_DEVICE_MEMORY_FULL);
+ goto GL_FAILED;
+ }
+
if (ad->albuminfo.path == NULL) {
gl_dbg("New album");
if (gl_make_new_album(ad->albuminfo.new_name) == false) {