summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-18 11:35:44 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-18 11:35:44 +0100
commit047872e7cc7f2f8fb2d7473be622d7aab799ed2d (patch)
treed78a245bd2e379d201846ab16624f6667ece259e
parenta5b84c6c6e7fb6b98d561335c1d72926db1f0e40 (diff)
efreet - mtime 0 fix build on windows
-rw-r--r--src/lib/efreet/efreet_cache.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index 2b5d0c9f5f..a8eb425b6a 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -630,6 +630,8 @@ efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check)
630 ssize_t size = 0; 630 ssize_t size = 0;
631 char link[PATH_MAX]; 631 char link[PATH_MAX];
632 632
633 memset(check, 0, sizeof(Efreet_Cache_Check));
634#ifndef _WIN32
633 if (lstat(file, &st) != 0) return EINA_FALSE; 635 if (lstat(file, &st) != 0) return EINA_FALSE;
634 if (S_ISLNK(st.st_mode)) 636 if (S_ISLNK(st.st_mode))
635 { 637 {
@@ -637,14 +639,18 @@ efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check)
637 if ((size > 0) && ((size_t)size >= sizeof(link))) return EINA_FALSE; 639 if ((size > 0) && ((size_t)size >= sizeof(link))) return EINA_FALSE;
638 if (stat(file, &st) != 0) return EINA_FALSE; 640 if (stat(file, &st) != 0) return EINA_FALSE;
639 } 641 }
640
641 memset(check, 0, sizeof(Efreet_Cache_Check));
642 if (size > 0) sha1((unsigned char *)link, size, check->link_sha1); 642 if (size > 0) sha1((unsigned char *)link, size, check->link_sha1);
643 else memset(check->link_sha1, 0, sizeof(check->link_sha1)); 643 else
644#endif
645 memset(check->link_sha1, 0, sizeof(check->link_sha1));
644 check->uid = st.st_uid; 646 check->uid = st.st_uid;
645 check->gid = st.st_gid; 647 check->gid = st.st_gid;
646 check->size = st.st_size; 648 check->size = st.st_size;
649#ifndef _WIN32
647 check->blocks = st.st_blocks; 650 check->blocks = st.st_blocks;
651#else
652 check->blocks = 0;
653#endif
648 check->mtime = st.st_mtime; 654 check->mtime = st.st_mtime;
649 check->chtime = st.st_ctime; 655 check->chtime = st.st_ctime;
650 check->mode = st.st_mode; 656 check->mode = st.st_mode;