From 7194a5cce163ad3ba330f35c7155f8a8ccf99ef7 Mon Sep 17 00:00:00 2001
From: Juan Pablo Novillo <juampy72@gmail.com>
Date: Sat, 16 Jun 2012 19:46:12 +0200
Subject: [PATCH] Issue #1509936 by filler and juampy: archive-dump symlinks default.settings.php to itself within sites/default thus causing archive-restore to crash

Removed flag z from tar statement when ensuring if default.settings.php is present as the file has not yet been compressed with gzip.
---
 commands/core/archive.drush.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/commands/core/archive.drush.inc b/commands/core/archive.drush.inc
index 6df13c2..7e045d4 100644
--- a/commands/core/archive.drush.inc
+++ b/commands/core/archive.drush.inc
@@ -246,7 +246,7 @@ function drush_archive_dump($sites_subdirs = '@self') {
   // by site-install when restoring a site without any DB.
   // NOTE: Windows tar file replace operation is broken so we have to check if file already exists.
   // Otherwise it will corrupt the archive.
-  $res = drush_shell_cd_and_exec($workdir, "$tar -tzf %s %s", $destination, $docroot . '/sites/default/default.settings.php');
+  $res = drush_shell_cd_and_exec($workdir, "$tar -tf %s %s", $destination, $docroot . '/sites/default/default.settings.php');
   $output = drush_shell_exec_output();
   if (!$res || !isset($output[0]) || empty($output[0])) {
     drush_shell_cd_and_exec($workdir, "$tar --dereference -vrf %s %s", $destination, $docroot . '/sites/default/default.settings.php');
-- 
1.7.4.1

