#include "curl_download.h"
#include "preferences.h"
#include "globals.h"
+#include "vik_compat.h"
static gboolean check_file_first_line(FILE* f, gchar *patterns[])
{
VikLayerParamData tmp;
tmp.u = VIK_CONFIG_DEFAULT_TILE_AGE / 86400; // Now in days
a_preferences_register(prefs, tmp, VIKING_PREFERENCES_GROUP_KEY);
+ file_list_mutex = vik_mutex_new();
+}
- file_list_mutex = g_mutex_new();
+void a_download_uninit (void)
+{
+ vik_mutex_free(file_list_mutex);
}
static gboolean lock_file(const char *fn)
utimes ( fn, NULL ); /* update mtime of local copy */
#endif
} else {
- g_rename ( tmpfilename, fn ); /* move completely-downloaded file to permanent location */
+ /* move completely-downloaded file to permanent location */
+ if ( g_rename ( tmpfilename, fn ) )
+ g_warning ("%s: file rename failed [%s] to [%s]", __FUNCTION__, tmpfilename, fn );
}
unlock_file ( tmpfilename );
g_free ( tmpfilename );