Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive_file uses backslashes in zipped files' paths on Windows #17485

Closed
dtreskunov opened this issue Mar 2, 2018 · 2 comments
Closed

archive_file uses backslashes in zipped files' paths on Windows #17485

dtreskunov opened this issue Mar 2, 2018 · 2 comments

Comments

@dtreskunov
Copy link

Terraform Version

Terraform v0.11.3
+ provider.archive v1.0.0

OS: Windows

Terraform Configuration Files

provider "archive" {
  version = "~> 1.0"
}

data "archive_file" "test" {
  type        = "zip"
  source_dir  = "test"
  output_path = "test.zip"
}

Expected Behavior

The generated test.zip file should contain sub/file.txt. This way, when the file is unzipped on a Linux system, directories are handled properly. Cygwin's zip as well as Windows built-in zip utility both behave correctly.

Actual Behavior

The generated test.zip file contains sub\file.txt.

Archive:  test.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        4  00-00-1980 00:00   sub\file.txt
---------                     -------
        4                     1 file

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. In an empty directory, paste the above into main.tf
  2. mkdir -p test/sub
  3. touch test/sub/file.txt
  4. terraform init
  5. terraform plan
  6. unzip -l test.zip
@ghost
Copy link

ghost commented Mar 2, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-archive#12 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-archive#12.

@ghost ghost closed this as completed Mar 2, 2018
@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants