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, Guido
From 7937e77ace8f64cb03da6fafe50cd51757c5c83a Mon Sep 17 00:00:00 2001 From: Guido Lerch <[email protected]> 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 files. 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 <[email protected]> --- 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) break; - 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 */ #endif count++; } -- 1.9.1
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
