diff --git a/src/alpm_config.vala b/src/alpm_config.vala
index 016308f9c41fffd2aec0db6ee1213b7960904d93..96f7f773c90cda75fb5b8c03d495f182b85b52a8 100644
--- a/src/alpm_config.vala
+++ b/src/alpm_config.vala
@@ -140,10 +140,12 @@ public class AlpmConfig {
 		if (tmp_db) {
 			string tmp_dbpath = "/tmp/pamac-checkdbs";
 			try {
-				Process.spawn_command_line_sync ("mkdir -p %s/sync".printf (tmp_dbpath));
-				Process.spawn_command_line_sync ("ln -sf %slocal %s".printf (dbpath, tmp_dbpath));
-				Process.spawn_command_line_sync ("chmod -R 777 %s/sync".printf (tmp_dbpath));
-				Process.spawn_command_line_sync ("bash -c 'cp -p %ssync/*.{db,files} %s/sync'".printf (dbpath, tmp_dbpath));
+				if (! GLib.FileUtils.test (tmp_dbpath, GLib.FileTest.IS_DIR)) {
+					Process.spawn_command_line_sync ("mkdir -p %s/sync".printf (tmp_dbpath));
+					Process.spawn_command_line_sync ("ln -sf %slocal %s".printf (dbpath, tmp_dbpath));
+					Process.spawn_command_line_sync ("chmod -R 777 %s/sync".printf (tmp_dbpath));
+					Process.spawn_command_line_sync ("bash -c 'cp -p %ssync/*.{db,files} %s/sync'".printf (dbpath, tmp_dbpath));
+				}
 				handle = new Alpm.Handle (rootdir, tmp_dbpath, out error);
 			} catch (SpawnError e) {
 				stderr.printf ("SpawnError: %s\n", e.message);