summaryrefslogtreecommitdiff
path: root/source3/lib/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/time.c')
-rw-r--r--source3/lib/time.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index c5584fd143..050b4725a7 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -500,10 +500,15 @@ char *timestring(void )
structure.
****************************************************************************/
-time_t get_create_time(struct stat *st)
+time_t get_create_time(struct stat *st,BOOL fake_dirs)
{
- time_t ret = MIN(st->st_ctime, st->st_mtime);
- time_t ret1 = MIN(ret, st->st_atime);
+ time_t ret, ret1;
+
+ if(S_ISDIR(st->st_mode) && fake_dirs)
+ return (time_t)315493200L; /* 1/1/1980 */
+
+ ret = MIN(st->st_ctime, st->st_mtime);
+ ret1 = MIN(ret, st->st_atime);
if(ret1 != (time_t)0)
return ret1;