Version 1
[yaffs-website] / vendor / drupal / console / src / Zippy / Adapter / TarGzGNUTarForWindowsAdapter.php
diff --git a/vendor/drupal/console/src/Zippy/Adapter/TarGzGNUTarForWindowsAdapter.php b/vendor/drupal/console/src/Zippy/Adapter/TarGzGNUTarForWindowsAdapter.php
new file mode 100644 (file)
index 0000000..143c8b9
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Console\Zippy\Adapter\TarGzGNUTarForWindowsAdapter.
+ */
+
+namespace Drupal\Console\Zippy\Adapter;
+
+use Alchemy\Zippy\Adapter\GNUTar\TarGzGNUTarAdapter;
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
+use Alchemy\Zippy\Exception\NotSupportedException;
+
+/**
+ * Class TarGzGNUTarForWindowsAdapter
+ *
+ * @package Drupal\Console\Zippy\Adapter
+ */
+class TarGzGNUTarForWindowsAdapter extends TarGzGNUTarAdapter
+{
+    /**
+     * @inheritdoc
+     */
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
+    {
+        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
+    }
+
+    /**
+     * @inheritdoc
+     */
+    protected function getLocalOptions()
+    {
+        return array_merge(parent::getLocalOptions(), ['--force-local']);
+    }
+}