Use mkpath, thanks Seb :)

SVN revision: 32036
This commit is contained in:
Christopher Michael 2007-10-10 19:04:55 +00:00
parent 7acb2dc42d
commit d46f266dcc
1 changed files with 3 additions and 6 deletions

View File

@ -1634,16 +1634,13 @@ _e_cb_fop_trash_idler(void *data)
fop = (E_Fop *)data;
if (!fop) return 0;
/* Check that 'home trash' exists, create if not */
/* Check that 'home trash' and subsequesnt dirs exists, create if not */
snprintf(buf, sizeof(buf), "%s/Trash", efreet_data_home_get());
trash_dir = evas_stringshare_add(buf);
if (!ecore_file_exists(trash_dir)) ecore_file_mkdir(trash_dir);
/* Create required 'info' and 'files' subdirs if needed */
snprintf(buf, sizeof(buf), "%s/files", trash_dir);
if (!ecore_file_exists(buf)) ecore_file_mkdir(buf);
ecore_file_mkpath(buf);
snprintf(buf, sizeof(buf), "%s/info", trash_dir);
if (!ecore_file_exists(buf)) ecore_file_mkdir(buf);
ecore_file_mkpath(buf);
filename = evas_stringshare_add(strrchr(fop->src, '/'));
escname = ecore_file_escape_name(filename);