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;
--- libgphoto2-2.5.32/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c.orig	2025-07-11 17:46:04.413633300 +0200
+++ libgphoto2-2.5.32/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c	2025-07-11 17:47:14.649204200 +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>
