Mercurial > geeqie
comparison src/metadata.c @ 1720:808d4308ca00
remove deleted files from metadata queue
author | nadvornik |
---|---|
date | Sat, 22 Aug 2009 21:58:49 +0000 |
parents | f1e316c4cc4d |
children | 956aab097ea7 |
comparison
equal
deleted
inserted
replaced
1719:192d4752fd06 | 1720:808d4308ca00 |
---|---|
124 ret = ret && metadata_write_queue_remove(fd); | 124 ret = ret && metadata_write_queue_remove(fd); |
125 } | 125 } |
126 return ret; | 126 return ret; |
127 } | 127 } |
128 | 128 |
129 void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data) | |
130 { | |
131 if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && g_list_find(metadata_write_queue, fd)) | |
132 { | |
133 DEBUG_1("Notify metadata: %s %04x", fd->path, type); | |
134 if (!isname(fd->path)) | |
135 { | |
136 /* ignore deleted files */ | |
137 metadata_write_queue_remove(fd); | |
138 } | |
139 } | |
140 } | |
129 | 141 |
130 gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data) | 142 gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data) |
131 { | 143 { |
132 GList *work; | 144 GList *work; |
133 GList *to_approve = NULL; | 145 GList *to_approve = NULL; |
135 work = metadata_write_queue; | 147 work = metadata_write_queue; |
136 while (work) | 148 while (work) |
137 { | 149 { |
138 FileData *fd = work->data; | 150 FileData *fd = work->data; |
139 work = work->next; | 151 work = work->next; |
152 | |
153 if (!isname(fd->path)) | |
154 { | |
155 /* ignore deleted files */ | |
156 metadata_write_queue_remove(fd); | |
157 continue; | |
158 } | |
140 | 159 |
141 if (fd->change) continue; /* another operation in progress, skip this file for now */ | 160 if (fd->change) continue; /* another operation in progress, skip this file for now */ |
142 | 161 |
143 to_approve = g_list_prepend(to_approve, file_data_ref(fd)); | 162 to_approve = g_list_prepend(to_approve, file_data_ref(fd)); |
144 } | 163 } |