2008-05-06 [colin] 3.4.0cvs26
* src/common/utils.c Maybe fix crash on FreeBSD
This commit is contained in:
parent
a3192bc71d
commit
28d76dd1a6
|
@ -1,3 +1,8 @@
|
|||
2008-05-06 [colin] 3.4.0cvs26
|
||||
|
||||
* src/common/utils.c
|
||||
Maybe fix crash on FreeBSD
|
||||
|
||||
2008-05-05 [colin] 3.4.0cvs25
|
||||
|
||||
* src/messageview.c
|
||||
|
|
|
@ -3321,3 +3321,4 @@
|
|||
( cvs diff -u -r 1.382.2.446 -r 1.382.2.447 src/compose.c; cvs diff -u -r 1.204.2.167 -r 1.204.2.168 src/prefs_common.c; ) > 3.4.0cvs23.patchset
|
||||
( cvs diff -u -r 1.83.2.128 -r 1.83.2.129 src/mimeview.c; ) > 3.4.0cvs24.patchset
|
||||
( cvs diff -u -r 1.94.2.175 -r 1.94.2.176 src/messageview.c; ) > 3.4.0cvs25.patchset
|
||||
( cvs diff -u -r 1.36.2.138 -r 1.36.2.139 src/common/utils.c; ) > 3.4.0cvs26.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=4
|
|||
MICRO_VERSION=0
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=25
|
||||
EXTRA_VERSION=26
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -5022,24 +5022,26 @@ int claws_unlink(const gchar *filename)
|
|||
if (filename == NULL)
|
||||
return 0;
|
||||
|
||||
if (found_shred == -1) {
|
||||
/* init */
|
||||
args[0] = g_find_program_in_path("shred");
|
||||
debug_print("found shred: %s\n", args[0]);
|
||||
found_shred = (args[0] != NULL) ? 1:0;
|
||||
args[1] = "-f";
|
||||
args[3] = NULL;
|
||||
}
|
||||
if (found_shred == 1 && prefs_common_get_use_shred()) {
|
||||
if (is_file_exist(filename) && g_stat(filename, &s) == 0) {
|
||||
if (s.st_nlink == 1) {
|
||||
gint status=0;
|
||||
args[2] = filename;
|
||||
g_spawn_sync(NULL, (gchar **)args, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, &status, NULL);
|
||||
debug_print("%s %s exited with status %d\n",
|
||||
args[0], filename, WEXITSTATUS(status));
|
||||
truncate(filename, 0);
|
||||
if (prefs_common_get_use_shred()) {
|
||||
if (found_shred == -1) {
|
||||
/* init */
|
||||
args[0] = g_find_program_in_path("shred");
|
||||
debug_print("found shred: %s\n", args[0]);
|
||||
found_shred = (args[0] != NULL) ? 1:0;
|
||||
args[1] = "-f";
|
||||
args[3] = NULL;
|
||||
}
|
||||
if (found_shred == 1) {
|
||||
if (g_stat(filename, &s) == 0 && S_ISREG(s.st_mode)) {
|
||||
if (s.st_nlink == 1) {
|
||||
gint status=0;
|
||||
args[2] = filename;
|
||||
g_spawn_sync(NULL, (gchar **)args, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, &status, NULL);
|
||||
debug_print("%s %s exited with status %d\n",
|
||||
args[0], filename, WEXITSTATUS(status));
|
||||
truncate(filename, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue