summaryrefslogtreecommitdiff
path: root/tests/test-filesys.c
diff options
context:
space:
mode:
authorLutz Mueller <lutz@users.sourceforge.net>2001-08-27 21:42:13 +0000
committerLutz Mueller <lutz@users.sourceforge.net>2001-08-27 21:42:13 +0000
commit8388607ec8b20f874b3e49201378ca1e317929c4 (patch)
treec8feca0ff2bd25370335ab289b17a5de18eea69d /tests/test-filesys.c
parentad2a13ee8a84e5ee27f9c5dc2e792ac9fb519183 (diff)
downloadlibgphoto2-8388607ec8b20f874b3e49201378ca1e317929c4.tar.gz
2001-08-27 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
Patch from Fabrice Bellet <Fabrice.Bellet@creatis.insa-lyon.fr>: * camlibs/sierra/library.[c,h]: * camlibs/sierra/sierra.c: Use the new filesystem to cache file information and for listing files/folders. * include/gphoto2-file.h: * libgphoto2/file.c (gp_file_detect_mime_type), (gp_file_adjust_name_for_mime_type): New * libgphoto2/camera.c: list->count = 0; * libpghoto2/filesys.c (gp_filesystem_number): If this function is called, scan the whole filesystem. * tests/test-filesys.c: Test gp_filesystem_get_folder, too. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2102 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests/test-filesys.c')
-rw-r--r--tests/test-filesys.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-filesys.c b/tests/test-filesys.c
index adcbbfd64..fac35cab3 100644
--- a/tests/test-filesys.c
+++ b/tests/test-filesys.c
@@ -34,7 +34,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
{
printf (" -> The camera will list the files in '%s' here.\n", folder);
- if (!strcmp (folder, "/")) {
+ if (!strcmp (folder, "/whatever")) {
gp_list_append (list, "file1", NULL);
gp_list_append (list, "file2", NULL);
}
@@ -174,6 +174,10 @@ main (int argc, char **argv)
printf (" %i: '%s'\n", x, name);
}
+ printf ("*** Getting folder of 'file1'...\n");
+ CHECK (gp_filesystem_get_folder (fs, "file1", &name));
+ printf ("... found in '%s'.\n", name);
+
printf ("*** Freeing file system...\n");
CHECK (gp_filesystem_free (fs));