From 7fa9c1a6ec5e383a5d21bcfb3ffda7abbbba0893 Mon Sep 17 00:00:00 2001 From: Donn Morrison Date: Sat, 31 Mar 2001 11:14:12 +0000 Subject: [PATCH] bug fix, file/directory flags were reversed (testing is a good thing) (files showed up as directories, and vice versa) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@1809 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/kodak/dc3200/dc3200.c | 10 ++++++---- camlibs/kodak/dc3200/library.c | 2 +- libgphoto2_port/po/cat-id-tbl.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/camlibs/kodak/dc3200/dc3200.c b/camlibs/kodak/dc3200/dc3200.c index eb1036bd3..d214ada78 100644 --- a/camlibs/kodak/dc3200/dc3200.c +++ b/camlibs/kodak/dc3200/dc3200.c @@ -214,8 +214,10 @@ int camera_folder_list_folders (Camera *camera, const char *folder, i = 0; while(i < data_len) { + dump_buffer(ptr_data_buff, 20, "list", 20); + /* directories have 0x10 in their attribute */ - if(ptr_data_buff[11] & 0x10) { + if(!(ptr_data_buff[11] & 0x10)) { ptr_data_buff += 20; i += 20; continue; @@ -282,8 +284,8 @@ int camera_folder_list_files (Camera *camera, const char *folder, i = 0; while(i < data_len) { - /* directories have 0x10 in their attribute */ - if(!(ptr_data_buff[11] & 0x10)) { + /* files don't have 0x10 in their attribute */ + if(ptr_data_buff[11] & 0x10) { ptr_data_buff += 20; i += 20; continue; @@ -297,7 +299,7 @@ int camera_folder_list_files (Camera *camera, const char *folder, /* copy extension, last 3 bytes*/ strncat(filename, ptr_data_buff+8, 3); - if(!strstr(filename, "JPG") && !strstr(filename, "jpg")) { + if(!strstr(filename, ".JPG") && !strstr(filename, ".jpg")) { ptr_data_buff += 20; i += 20; continue; diff --git a/camlibs/kodak/dc3200/library.c b/camlibs/kodak/dc3200/library.c index c8f30dd1c..8764e9107 100644 --- a/camlibs/kodak/dc3200/library.c +++ b/camlibs/kodak/dc3200/library.c @@ -24,7 +24,7 @@ #include "library.h" -//#define DEBUG +#define DEBUG /* * dc3200_set_speed diff --git a/libgphoto2_port/po/cat-id-tbl.c b/libgphoto2_port/po/cat-id-tbl.c index 5984dce8d..01f192a6d 100644 --- a/libgphoto2_port/po/cat-id-tbl.c +++ b/libgphoto2_port/po/cat-id-tbl.c @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-03-30 10:27-0800\n" +"POT-Creation-Date: 2001-03-31 02:57-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"