Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/benchmarks/evas/evas_bench_saver.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ evas_bench_saver_tgv(int request)
evas_object_image_save(o, dest, NULL, "compress=1 quality=50");
}

unlink(dest);
eina_file_unlink(dest);
eina_tmpstr_del(dest);

evas_free(e);
Expand Down
3 changes: 1 addition & 2 deletions src/bin/ecore_evas/ecore_evas_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ static void
_sigint(int sig EINA_UNUSED)
{
EINA_LOG_ERR("Image save interrupted by SIGINT: '%s'.", job.output);
// eina_file_unlink
unlink(job.output);
eina_file_unlink(job.output);
exit(-1);
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/bin/efreet/efreet_desktop_cache_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ main(int argc, char **argv)
}
else
{
unlink(tmpuc);
unlink(tmpc);
eina_file_unlink(tmpuc);
eina_file_unlink(tmpc);
}

{
Expand Down
6 changes: 3 additions & 3 deletions src/bin/efreet/efreet_icon_cache_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ main(int argc, char **argv)
{
// delete old cache
eet_close(theme_ef);
if (unlink(efreet_icon_theme_cache_file()) < 0)
if (eina_file_unlink(efreet_icon_theme_cache_file()) != EINA_TRUE)
{
if (errno != ENOENT) goto on_error_efreet;
}
Expand Down Expand Up @@ -945,7 +945,7 @@ main(int argc, char **argv)
{
// delete old cache
eet_close(icon_ef);
if (unlink(efreet_icon_cache_file(theme->theme.name.internal)) < 0)
if (eina_file_unlink(efreet_icon_cache_file(theme->theme.name.internal)) != EINA_TRUE)
{
if (errno != ENOENT) goto on_error_efreet;
}
Expand Down Expand Up @@ -1023,7 +1023,7 @@ main(int argc, char **argv)
{
// delete old cache
eet_close(icon_ef);
if (unlink(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK)) < 0)
if (eina_file_unlink(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK)) != EINA_TRUE)
{
if (errno != ENOENT) goto on_error_efreet;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/efreet/efreet_mime_cache_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ store_cache(const char *out)
ERR("Cannot write to %s", buf);
error:
if (f) fclose(f);
if (unlink(buf) != 0) WRN("Cannot delete tmp file %s", buf);
if (eina_file_unlink(buf) != EINA_TRUE) WRN("Cannot delete tmp file %s", buf);
}

int
Expand Down
2 changes: 1 addition & 1 deletion src/bin/efreet/efreetd_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ subdir_cache_save(void)

if (rename(tmpstr, eina_strbuf_string_get(buf)) < 0)
{
unlink(tmpstr);
eina_file_unlink(tmpstr);
ERR("Can't save subdir cache %s", eina_strbuf_string_get(buf));
}
// we dont need saving anymore - we just did
Expand Down
4 changes: 2 additions & 2 deletions src/bin/elementary/elementary_codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ main(int argc, char *argv[])

if (ret > 4)
{
unlink(header);
unlink(source);
eina_file_unlink(header);
eina_file_unlink(source);
}

return ret;
Expand Down
2 changes: 1 addition & 1 deletion src/bin/elementary/quicklaunch.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ main(int argc, char **argv)
}
}
eina_vpath_resolve_snprintf(buf, sizeof(buf), "(:usr.run:)/elm-ql-%i/%s", getuid(), domain);
unlink(buf);
eina_file_unlink(buf);
sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (sock < 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/bin/embryo/embryo_cc_sc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ sc_closebin(void *handle, int deletefile)
{
fclose((FILE *) handle);
if (deletefile)
unlink(binfname);
eina_file_unlink(binfname);
}

void
Expand Down Expand Up @@ -401,7 +401,7 @@ sc_compile(int argc, char *argv[])
} /* if */
if (outf)
sc_closeasm(outf);
unlink(outfname);
eina_file_unlink(outfname);
eina_tmpstr_del(outfname);
if (binf)
sc_closebin(binf, errnum != 0);
Expand Down
2 changes: 1 addition & 1 deletion src/bin/exactness/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ _old_shots_rm_cb(const char *name, const char *path, void *data)
unsigned int length = strlen(path) + strlen(name) + 2;
char *buf = alloca(length);
snprintf(buf, length, "%s/%s", path, name);
if (unlink(buf))
if (eina_file_unlink(buf) != EINA_TRUE)
{
printf("Failed deleting '%s/%s': ", path, name);
perror("");
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ecore/ecore.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ _ecore_fps_debug_init(void)
_ecore_fps_debug_fd = open(buf, O_CREAT | O_BINARY | O_TRUNC | O_RDWR, 0644);
if (_ecore_fps_debug_fd < 0)
{
unlink(buf);
eina_file_unlink(buf);
_ecore_fps_debug_fd = open(buf, O_CREAT | O_BINARY | O_TRUNC | O_RDWR, 0644);
}
if (_ecore_fps_debug_fd >= 0)
Expand Down Expand Up @@ -922,7 +922,7 @@ _ecore_fps_debug_shutdown(void)
pid = (int)getpid();
snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i",
eina_environment_tmp_get(), pid);
unlink(buf);
eina_file_unlink(buf);
if (_ecore_fps_runtime_mmap)
{
munmap(_ecore_fps_runtime_mmap, sizeof(unsigned int));
Expand Down
10 changes: 5 additions & 5 deletions src/lib/ecore_con/efl_net_server_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ _efl_net_server_unix_bind_hang_lock_workaround(const char *address, Eina_Bool lo
else
{
flock(lockfile_fd, LOCK_UN | LOCK_NB);
unlink(lockfile);
eina_file_unlink(lockfile);
close(lockfile_fd);
lockfile_fd = -1;
}
Expand All @@ -113,7 +113,7 @@ _efl_net_server_unix_efl_object_destructor(Eo *o, Efl_Net_Server_Unix_Data *pd E
{
if ((address) &&
(strncmp(address, "abstract:", strlen("abstract:")) != 0))
unlink(address);
eina_file_unlink(address);
}
#ifdef BIND_HANG_WORKAROUND
if ((address) && (pd->have_lock_fd) && (pd->lock_fd >= 0))
Expand Down Expand Up @@ -182,7 +182,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
if ((pd->unlink_before_bind) && (addr.sun_path[0] != '\0'))
{
DBG("unlinking AF_UNIX path '%s'", addr.sun_path);
unlink(addr.sun_path);
eina_file_unlink(addr.sun_path);
}

#ifdef BIND_HANG_WORKAROUND
Expand All @@ -196,7 +196,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
goto error;
}
pd->have_lock_fd = EINA_TRUE;
unlink(addr.sun_path);
eina_file_unlink(addr.sun_path);
}
#endif
r = bind(fd, (struct sockaddr *)&addr, addrlen);
Expand All @@ -215,7 +215,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
{
DBG("bind(" SOCKET_FMT ", %s): failed with EADDRINUSE but connect also failed, so unlink socket file and try again", fd, address);
closesocket(fd);
unlink(addr.sun_path);
eina_file_unlink(addr.sun_path);
fd = INVALID_SOCKET;
err = 0;
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ecore_evas/ecore_evas.c
Original file line number Diff line number Diff line change
Expand Up @@ -2990,7 +2990,7 @@ _ecore_evas_fps_debug_init(void)
_ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_BINARY | O_TRUNC | O_RDWR, 0644);
if (_ecore_evas_fps_debug_fd < 0)
{
unlink(buf);
eina_file_unlink(buf);
_ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_BINARY | O_TRUNC | O_RDWR, 0644);
}
if (_ecore_evas_fps_debug_fd >= 0)
Expand Down Expand Up @@ -3038,7 +3038,7 @@ _ecore_evas_fps_debug_shutdown(void)

snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i",
eina_environment_tmp_get(), (int)getpid());
unlink(buf);
eina_file_unlink(buf);
if (_ecore_evas_fps_rendertime_mmap)
{
munmap(_ecore_evas_fps_rendertime_mmap, sizeof(int));
Expand Down
3 changes: 1 addition & 2 deletions src/lib/ecore_file/ecore_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ ecore_file_rmdir(const char *dir)
ECORE_FILE_API Eina_Bool
ecore_file_unlink(const char *file)
{
if (unlink(file) < 0) return EINA_FALSE;
return EINA_TRUE;
return eina_file_unlink(file);
}

ECORE_FILE_API Eina_Bool
Expand Down
6 changes: 3 additions & 3 deletions src/lib/edje/edje_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -12488,7 +12488,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
if (!f)
{
close(fd);
unlink(tmp_in);
eina_file_unlink(tmp_in);
return EINA_FALSE;
}

Expand Down Expand Up @@ -12619,11 +12619,11 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
the_doorway:
if (tmp_out)
{
unlink(tmp_out);
eina_file_unlink(tmp_out);
eina_tmpstr_del(tmp_out);
}
almost_out:
unlink(tmp_in);
eina_file_unlink(tmp_in);
eina_tmpstr_del(tmp_in);

return success;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/eio/eio_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ _eio_dir_move_heavy(void *data, Ecore_Thread *thread)
}

/* and unlink the original */
if (unlink(file) != 0)
if (eina_file_unlink(file) != EINA_TRUE)
{
eio_file_thread_error(&move->progress.common, thread);
goto on_error;
Expand Down Expand Up @@ -678,7 +678,7 @@ _eio_dir_rmrf_heavy(void *data, Ecore_Thread *thread)

EINA_LIST_FREE(rmrf->files, file)
{
if (unlink(file) != 0)
if (eina_file_unlink(file) != EINA_TRUE)
{
eio_file_thread_error(&rmrf->progress.common, thread);
goto on_error;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/eio/eio_single.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ _eio_file_unlink(void *data, Ecore_Thread *thread)
{
Eio_File_Unlink *l = data;

if (unlink(l->path) != 0)
if (eina_file_unlink(l->path) != EINA_TRUE)
eio_file_thread_error(&l->common, thread);
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/ecore_buffer/shm/ecore_buffer_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _ecore_buffer_shm_buffer_free(Ecore_Buffer_Module_Data bmdata EINA_UNUSED, Ecore
Ecore_Buffer_Shm_Data* b = bdata;

if (b->am_owner)
if (b->file) unlink(b->file);
if (b->file) eina_file_unlink(b->file);

if (b->addr != MAP_FAILED) munmap(b->addr, b->size);
eina_stringshare_del(b->file);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ _extnbuf_free(Extnbuf *b)
if (b->am_owner)
{
if (b->file) shm_unlink(b->file);
if (b->lock) unlink(b->lock);
if (b->lock) eina_file_unlink(b->lock);
}

if (b->addr != MAP_FAILED) munmap(b->addr, b->size);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/elementary/access_output/mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _exe_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
if (tmpf)
{
unlink(tmpf);
eina_file_unlink(tmpf);
free(tmpf);
tmpf = NULL;
close(tmpfd);
Expand Down Expand Up @@ -112,7 +112,7 @@ out_cancel(void)
}
if (tmpf)
{
unlink(tmpf);
eina_file_unlink(tmpf);
free(tmpf);
tmpf = NULL;
close(tmpfd);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/evas/engines/gl_common/evas_gl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ _surface_cap_cache_save()
if (tmpfd >= 0) close(tmpfd);
if (et) eet_close(et);
if (evas_gl_common_file_cache_file_exists(tmp_file_path))
unlink(tmp_file_path);
eina_file_unlink(tmp_file_path);
eina_tmpstr_del(tmp_file_path);
eet_shutdown();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/evas/engines/gl_common/evas_gl_shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared)
if (tmpfd >= 0) close(tmpfd);
if (ef) eet_close(ef);
if (evas_gl_common_file_cache_file_exists(tmp_file_path))
unlink(tmp_file_path);
eina_file_unlink(tmp_file_path);
eina_tmpstr_del(tmp_file_path);
eet_shutdown();
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ _load(Eina_File *ef, const char *key,
if (tmpfname)
{
close(fd);
unlink(tmpfname);
eina_file_unlink(tmpfname);
}
#ifdef HAVE_SHM_OPEN
else if (shmfname)
Expand Down
4 changes: 2 additions & 2 deletions src/tests/ecore_con/ecore_con_test_ecore_con_url.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct _url_test
static void
_free_url_test(url_test *info)
{
unlink(info->_test_file);
eina_file_unlink(info->_test_file);
eina_tmpstr_del(info->_test_file);
close(info->_tmpfd);
free(info);
Expand Down Expand Up @@ -371,7 +371,7 @@ static void
_ecore_con_url_cookies_test_shutdown(Ecore_Con_Url *ec_url, int tmpfd, Eina_Tmpstr **path)
{
close(tmpfd);
unlink(*path);
eina_file_unlink(*path);
eina_tmpstr_del(*path);
ecore_con_url_free(ec_url);
ecore_con_url_shutdown();
Expand Down
6 changes: 3 additions & 3 deletions src/tests/efreet/ef_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ ef_cb_desktop_save(void)
desktop = efreet_desktop_get("/tmp/test.desktop");
if (!desktop)
{
unlink("/tmp/test.desktop");
eina_file_unlink("/tmp/test.desktop");
printf("Failed to get Desktop file\n");
return 0;
}

printf("save data: %d\n", efreet_desktop_save(desktop));
efreet_desktop_free(desktop);
unlink("/tmp/test.desktop");
eina_file_unlink("/tmp/test.desktop");
}

desktop = efreet_desktop_empty_new("/tmp/test.desktop");
Expand All @@ -200,7 +200,7 @@ ef_cb_desktop_save(void)
desktop->categories = eina_list_append(desktop->categories,
eina_stringshare_add("Enlightenment"));
printf("save test: %d\n", efreet_desktop_save(desktop));
unlink("/tmp/test.desktop");
eina_file_unlink("/tmp/test.desktop");
efreet_desktop_free(desktop);

return 1;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/efreet/ef_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ef_cb_menu_save(void)
printf("efreet_menu_get() returned NULL\n");
return 0;
}
unlink("/tmp/test.menu");
eina_file_unlink("/tmp/test.menu");
ret = efreet_menu_save(menu, "/tmp/test.menu");
efreet_menu_free(menu);
return ret;
Expand Down
Loading