From 07b4878c52b88c858a1bd80f773456ab85495559 Mon Sep 17 00:00:00 2001 From: Guido Lerch Date: Wed, 21 Oct 2015 14:51:11 +0200 Subject: Uemis fix for Ubuntu Fixing a bug preventing to download files on Ubuntu. On Ubuntu some files 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 an expert to look at.. Signed-off-by: Guido Lerch Signed-off-by: Dirk Hohndel --- uemis-downloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uemis-downloader.c b/uemis-downloader.c index b79890599..2a6e5178c 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") || strstr(entry->d_name, ".txt")) /* If the entry is a regular file */ #endif count++; } -- cgit v1.2.3-70-g09d2