handle large files

SVN revision: 30195
This commit is contained in:
Carsten Haitzler 2007-06-02 16:35:10 +00:00
parent e5d58df463
commit ece72492b3
5 changed files with 49 additions and 6 deletions

2
TODO
View File

@ -37,6 +37,8 @@ Some of the things (in very short form) that need to be done to E17...
ESSENTIAL FEATURES
-------------------------------------------------------------------------------
* fm2 seems to have problems with files > 2gb
* fm2 slave leaks on continual file changes
* fm2 fwin windows need to use icon for that dir on window border
* fm2 needs to use different theme elements for desktop
* fm2 theme needs to not suck

View File

@ -12,6 +12,13 @@
#define OBJECT_CHECK
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#ifndef __USE_FILE_OFFSET64 /* for large file support */
#define __USE_FILE_OFFSET64
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -1797,6 +1797,28 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
}
}
}
else
{
if ((sd->id == e->ref_to) && (path[0] == 0))
{
if (e->response == 2)/* end of scan */
{
sd->listing = 0;
if (sd->scan_timer)
{
ecore_timer_del(sd->scan_timer);
sd->scan_timer =
ecore_timer_add(0.0001,
_e_fm2_cb_scan_timer,
sd->obj);
}
else
{
_e_fm2_client_monitor_list_end(l->data);
}
}
}
}
free(evdir);
}
break;

View File

@ -1,6 +1,13 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#ifndef __USE_FILE_OFFSET64 /* for large file support */
#define __USE_FILE_OFFSET64
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -823,11 +830,14 @@ _e_cb_file_mon_list_idler(void *data)
snprintf(buf, sizeof(buf), "/%s", file);
else
snprintf(buf, sizeof(buf), "%s/%s", ed->dir, file);
if ((!ed->fq->next) ||
((!strcmp(ed->fq->next->data, ".order")) &&
(!ed->fq->next->next)))
_e_file_add(ed, buf, 2);
/*
if (//(!ed->fq->next) ||
((!strcmp(ed->fq->next->data, ".order"))
//&& (!ed->fq->next->next)
))
_e_file_add(ed, buf, 1);
else
*/
_e_file_add(ed, buf, 1);
}
free(file);
@ -837,6 +847,7 @@ _e_cb_file_mon_list_idler(void *data)
{
_e_file_mon_list_sync(ed);
ed->idler = NULL;
if (!ed->fq) _e_file_add(ed, "", 2);
return 0;
}
}
@ -844,6 +855,7 @@ _e_cb_file_mon_list_idler(void *data)
ed->sync = 0;
ed->sync_time = 0.0;
ed->idler = NULL;
if (!ed->fq) _e_file_add(ed, "", 2);
return 0;
}

View File

@ -114,7 +114,7 @@ evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
(*func) (obj, file, key);
}
time_t
long long
ecore_file_mod_time(const char *file)
{
static time_t (*func) (const char *file) = NULL;
@ -125,7 +125,7 @@ ecore_file_mod_time(const char *file)
return (*func) (file);
}
int
long long
ecore_file_size(const char *file)
{
static int (*func) (const char *file) = NULL;