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
This commit is contained in:
Donn Morrison
2001-03-31 11:14:12 +00:00
parent 4f78392b98
commit 7fa9c1a6ec
3 changed files with 8 additions and 6 deletions

View File

@@ -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;

View File

@@ -24,7 +24,7 @@
#include "library.h"
//#define DEBUG
#define DEBUG
/*
* dc3200_set_speed

View File

@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"