/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto & The Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
return str;
}
-gint execute_async(gchar *const argv[])
+static gint execute_async(gchar *const argv[])
{
g_return_val_if_fail(argv != NULL && argv[0] != NULL, -1);
return 0;
}
-gint execute_sync(gchar *const argv[])
+static gint execute_sync(gchar *const argv[])
{
gint status;
}
}
-void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
+static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
{
int i;
int k;
debug_print("copying: %s -> %s\n", old_file, new_file);
if (g_file_test(old_file, G_FILE_TEST_IS_REGULAR)) {
gint r = copy_file(old_file, new_file, TRUE);
- if (r < 0)
+ if (r < 0) {
+ g_dir_close(dir);
return r;
+ }
} else if (g_file_test(old_file, G_FILE_TEST_IS_SYMLINK)) {
GError *error;
gint r = 0;
if (target)
r = symlink(target, new_file);
g_free(target);
- if (r < 0)
+ if (r < 0) {
+ g_dir_close(dir);
return r;
+ }
} else if (g_file_test(old_file, G_FILE_TEST_IS_DIR)) {
gint r = copy_dir(old_file, new_file);
- if (r < 0)
+ if (r < 0) {
+ g_dir_close(dir);
return r;
+ }
}
}
+ g_dir_close(dir);
return 0;
}