fixed unseeable directories/files after reading the microsoft fat
specification white paper git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@1701 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -199,8 +199,8 @@ int camera_folder_list (Camera *camera, CameraList *list, char *folder)
|
||||
i = 0;
|
||||
|
||||
while(i < data_len) {
|
||||
/* files have 0x00,0x01,0x20, dirs have 0x10,0x30 */
|
||||
if(ptr_data_buff[11] != 0x10 && ptr_data_buff[11] != 0x30) {
|
||||
/* directories have 0x10 in their attribute */
|
||||
if(ptr_data_buff[11] & 0x10) {
|
||||
ptr_data_buff += 20;
|
||||
i += 20;
|
||||
continue;
|
||||
@@ -266,10 +266,8 @@ int camera_file_list (Camera *camera, CameraList *list, char *folder)
|
||||
i = 0;
|
||||
|
||||
while(i < data_len) {
|
||||
/* files have 0x00,0x01,0x20, dirs have 0x10,0x30 */
|
||||
if(ptr_data_buff[11] != 0x00 &&
|
||||
ptr_data_buff[11] != 0x20 &&
|
||||
ptr_data_buff[11] != 0x01) {
|
||||
/* directories have 0x10 in their attribute */
|
||||
if(!(ptr_data_buff[11] & 0x10)) {
|
||||
ptr_data_buff += 20;
|
||||
i += 20;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user