diff --git a/libgphoto2/camera.c b/libgphoto2/camera.c index 0f6f2f178..4e2d27d21 100644 --- a/libgphoto2/camera.c +++ b/libgphoto2/camera.c @@ -475,6 +475,8 @@ gp_camera_folder_list_files (Camera *camera, const char *folder, result = gp_filesystem_list_files (camera->fs, folder, list); CHECK_CLOSE (camera); //Remove this when camera drivers are updated to use camera->fs +if (!list->count && !camera->functions->folder_list_files) +return (GP_OK); if (list->count) if (result != GP_ERROR_NOT_SUPPORTED) return (result); @@ -505,6 +507,8 @@ gp_camera_folder_list_folders (Camera *camera, const char* folder, result = gp_filesystem_list_folders (camera->fs, folder, list); CHECK_CLOSE (camera); //Remove this when camera drivers are updated to use camera->fs +if (!list->count && !camera->functions->folder_list_folders) +return (GP_OK); if (list->count) if (result != GP_ERROR_NOT_SUPPORTED) return (result);