browser videos dir - if efreet reports a silly dir for videos... handle
so if someone is sily and sets their videos dir to be $HOME ... don't use it as frankly that makes the video browser useless. it is not meant for such a mess of dirs. it's meant for a special subdirectory system which is primarly just media files and nothing else ... not $HOME
This commit is contained in:
parent
b51376f255
commit
9e8752a7d9
|
@ -189,9 +189,19 @@ static void
|
||||||
_fill_thread(void *data EINA_UNUSED, Ecore_Thread *th)
|
_fill_thread(void *data EINA_UNUSED, Ecore_Thread *th)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
const char *vids;
|
const char *vids, *home;
|
||||||
|
char *vidsreal = NULL, *homereal = NULL;
|
||||||
|
|
||||||
vids = efreet_videos_dir_get();
|
vids = efreet_videos_dir_get();
|
||||||
|
if (vids) vidsreal = ecore_file_realpath(vids);
|
||||||
|
home = eina_environment_home_get();
|
||||||
|
if (home) homereal = ecore_file_realpath(home);
|
||||||
|
if ((vidsreal) && (homereal))
|
||||||
|
{
|
||||||
|
if (!strcmp(vidsreal, homereal)) vids = NULL;
|
||||||
|
}
|
||||||
|
free(vidsreal);
|
||||||
|
free(homereal);
|
||||||
if (vids)
|
if (vids)
|
||||||
snprintf(buf, sizeof(buf), "%s", vids);
|
snprintf(buf, sizeof(buf), "%s", vids);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue