handle no parameter without previous directory.

SVN revision: 53321
v-1.6.0
Gustavo Sverzut Barbieri 13 years ago
parent 404e232767
commit f5e062c676
  1. 16
      src/bin/ephoto_main.c

@ -205,11 +205,19 @@ ephoto_window_add(const char *path)
if ((!path) || (!ecore_file_exists(path)))
{
ephoto_thumb_browser_directory_set
(ephoto->thumb_browser, ephoto->config->directory);
_ephoto_thumb_browser_show(ephoto, NULL);
char buf[PATH_MAX];
path = ephoto->config->directory;
if ((path) && (!ecore_file_exists(path))) path = NULL;
if (!path)
{
if (getcwd(buf, sizeof(buf)))
path = buf;
else
path = getenv("HOME");
}
}
else if (ecore_file_is_dir(path))
if (ecore_file_is_dir(path))
{
ephoto_thumb_browser_directory_set(ephoto->thumb_browser, path);
_ephoto_thumb_browser_show(ephoto, NULL);

Loading…
Cancel
Save