aboutsummaryrefslogtreecommitdiff
path: root/src/navigator.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2016-01-15 16:16:10 +0000
committerHarry Jeffery <harry@exec64.co.uk>2016-01-15 16:16:10 +0000
commit58fe28b650dfcdd3efe78fb0559cab5b7e811bb5 (patch)
tree73d290727b720e39b36c8165e1ea9202374726f3 /src/navigator.c
parentefa33ab844a09f05907a5de2d66ed7331c4f8ec9 (diff)
parent1ae8a7fe6030771352e347e7564639ea181802ba (diff)
downloadimv-58fe28b650dfcdd3efe78fb0559cab5b7e811bb5.tar.gz
Merge pull request #76 from czarkoff/loader
Loading image data from standard input
Diffstat (limited to 'src/navigator.c')
-rw-r--r--src/navigator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/navigator.c b/src/navigator.c
index fb2a3cd..dd5124d 100644
--- a/src/navigator.c
+++ b/src/navigator.c
@@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "navigator.h"
+#include <limits.h>
#include <sys/stat.h>
#include <dirent.h>
#include <stdlib.h>
@@ -84,7 +85,7 @@ static void add_item(struct imv_navigator *nav, const char *path,
void imv_navigator_add(struct imv_navigator *nav, const char *path,
int recursive)
{
- char path_buf[512];
+ char path_buf[PATH_MAX];
struct stat path_info;
stat(path, &path_info);
if(S_ISDIR(path_info.st_mode)) {