[gthumb] Use g_file_delete instead of file_unlink if FileData is available
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Use g_file_delete instead of file_unlink if FileData is available
- Date: Sun, 7 Jun 2009 15:24:13 -0400 (EDT)
commit a373f00592a7f8476cef951890d709e691a8b08a
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Sun Jun 7 15:23:42 2009 -0400
Use g_file_delete instead of file_unlink if FileData is available
---
libgthumb/file-utils.c | 2 +-
src/dlg-convert.c | 2 +-
src/gth-batch-op.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index 3893687..f7a9b9d 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -2253,7 +2253,7 @@ free_cache (void)
GList *scan;
for (scan = files; scan; scan = scan->next ) {
FileData *file = scan->data;
- file_unlink (file->utf8_path);
+ g_file_delete (file->gfile, NULL, NULL);
}
}
diff --git a/src/dlg-convert.c b/src/dlg-convert.c
index b8fa5bf..2aea959 100644
--- a/src/dlg-convert.c
+++ b/src/dlg-convert.c
@@ -246,7 +246,7 @@ save_image_and_remove_original (DialogData *data)
data->saved_list = g_list_prepend (data->saved_list, g_strdup (fd_new->utf8_path));
if (data->remove_original && ! file_data_same (fd_old, fd_new)) {
- file_unlink (fd_old->utf8_path);
+ g_file_delete (fd_old->gfile, NULL, NULL);
data->deleted_list = g_list_prepend (data->deleted_list, g_strdup (fd_old->utf8_path));
}
}
diff --git a/src/gth-batch-op.c b/src/gth-batch-op.c
index 4ff8938..476f7d9 100644
--- a/src/gth-batch-op.c
+++ b/src/gth-batch-op.c
@@ -468,7 +468,7 @@ pixbuf_op_done_cb (GthPixbufOp *pixop,
if (! file_data_same (fd_old, fd_new)) {
comment_copy (fd_old->utf8_path, fd_new->utf8_path);
if (PD(bop)->remove_original) {
- file_unlink (fd_old->utf8_path);
+ g_file_delete (fd_old->gfile, NULL, NULL);
PD(bop)->deleted_list = g_list_prepend (PD(bop)->deleted_list, g_strdup (fd_old->utf8_path));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]