From b536e51cf8a766c41f175232dcc01fb5eca5aba5 Mon Sep 17 00:00:00 2001
From: Guido Lerch <guido.lerch@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
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 <guido.lerch@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..2a6e517 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++;
 	}
-- 
1.9.1

