blob: 6b802a74b0323299ad942cf731f6630658cfcbe7 [file] [log] [blame]
diff -Naur libgphoto2-2.5.10.orig/libgphoto2/gphoto2-filesys.c libgphoto2-2.5.10/libgphoto2/gphoto2-filesys.c
--- libgphoto2-2.5.10.orig/libgphoto2/gphoto2-filesys.c 2016-01-25 20:29:59.000000000 +0100
+++ libgphoto2-2.5.10/libgphoto2/gphoto2-filesys.c 2016-10-20 20:35:51.718041700 +0200
@@ -764,6 +764,9 @@
gp_list_free (xlist);
if (ret != GP_OK) return ret;
}
+
+ // Only try to append the file if filename is not empty
+ if (filename && strlen(filename)!=0)
ret = internal_append (fs, f, filename, context);
if (ret == GP_ERROR_FILE_EXISTS) /* not an error here ... just in case we add files twice to the list */
ret = GP_OK;
diff -Naur libgphoto2-2.5.10.orig/libgphoto2_port/gphoto2/gphoto2-port-portability.h libgphoto2-2.5.10/libgphoto2_port/gphoto2/gphoto2-port-portability.h
--- libgphoto2-2.5.10.orig/libgphoto2_port/gphoto2/gphoto2-port-portability.h 2016-01-25 20:29:59.000000000 +0100
+++ libgphoto2-2.5.10/libgphoto2_port/gphoto2/gphoto2-port-portability.h 2016-10-21 00:20:35.357889900 +0200
@@ -48,7 +48,9 @@
#define __func__ __FUNCTION__
+#ifndef _SSIZE_T_DEFINED
typedef SSIZE_T ssize_t;
+#endif
/* Work-around for readdir() */
typedef struct {
diff -Naur libgphoto2-2.5.10.orig/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c libgphoto2-2.5.10/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c
--- libgphoto2-2.5.10.orig/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c 2016-01-25 20:29:59.000000000 +0100
+++ libgphoto2-2.5.10/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c 2016-10-20 20:32:40.376682900 +0200
@@ -44,11 +44,14 @@
/* already converted */
return;
- if (path[0] != '.') {
+ //What was the purpose of this?
+ //copying the second character to the first place if path does not start with "."?
+/* if (path[0] != '.') {
path[0] = path[1];
path[1] = ':';
path[2] = '\\';
}
+*/
for (x=0; x<strlen(path); x++)
if (path[x] == '/')
diff -Naur libgphoto2-2.5.10.orig/libgphoto2_port/usb/libusb.c libgphoto2-2.5.10/libgphoto2_port/usb/libusb.c
--- libgphoto2-2.5.10.orig/libgphoto2_port/usb/libusb.c 2016-02-07 20:56:40.000000000 +0100
+++ libgphoto2-2.5.10/libgphoto2_port/usb/libusb.c 2016-10-20 20:33:17.263585300 +0200
@@ -34,6 +34,10 @@
#include <dirent.h>
#include <string.h>
+#ifndef ENODATA
+# define ENODATA 120 /* No data available */
+#endif
+
#include <usb.h>
#include <gphoto2/gphoto2-port.h>