Uemis patch

Guido Lerch guido.lerch at gmail.com
Wed Oct 21 06:21:35 PDT 2015

fixing an issue with loading dives on Ubuntu.

it seems that this code does not resolve the file type
correctly. it returns DT_REG also on ANSx.TXT files.

Tested the fix on Ubuntu 14.04 and Mac OSX 10.9,
not tested on El Captain but I assume no issues there.

This fix affects Uemis only.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151021/dadadc0b/attachment-0001.html>
-------------- next part --------------
From 7937e77ace8f64cb03da6fafe50cd51757c5c83a Mon Sep 17 00:00:00 2001
From: Guido Lerch <guido.lerch at gmail.com>
Date: Wed, 21 Oct 2015 14:51:11 +0200
Subject: [PATCH] Uemis fix for Ubuntu

Fixing a but preventing to download files on Ubuntu.
On Ubuntu are recognized as DIR and not as regular
This is a fix that works but most lilely does not address
the root cause which would need a crack to look at..

Signed-off-by: Guido Lerch <guido.lerch at gmail.com>
 uemis-downloader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uemis-downloader.c b/uemis-downloader.c
index b798905..16a8218 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -207,7 +207,7 @@ static int number_of_file(char *path)
 		entry = readdir(dirp);
 		if (!entry)
-		if (entry->d_type == DT_REG) /* If the entry is a regular file */
+		if (strstr(entry->d_name, ".TXT")) /* If the entry is a regular file */

More information about the subsurface mailing list