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

Downloaded folders in a zip file don't include linked files #1007

Open
PedroTeixido opened this issue May 10, 2019 · 2 comments
Open

Downloaded folders in a zip file don't include linked files #1007

PedroTeixido opened this issue May 10, 2019 · 2 comments

Comments

@PedroTeixido
Copy link
Contributor

We have 1.6.2 installed, and we often pack several files in a folder that is a single deliverable. So, when we have to release it, the download feature becomes very handy as dms will compress it all and download as a ZIP file.

The problem is that we have found that linked files in the folder wont be included in the zip. Adding them manually is not much of a hazel, but the risk of non realising that something is missing is big.

I have tried to patch it, but I didn't succeed. can anyone help please?

@picman picman added this to the 2.0.1 milestone Jun 19, 2019
@picman picman self-assigned this Jun 19, 2019
@picman
Copy link
Collaborator

picman commented Jun 19, 2019

If I compress a folder containing a link in OS, just a link is added to the archive. In our case I'd replace the link with the target file/folder instead. Otherwise it wouldn't make sense, I think. Especially in case of links between projects.

@picman picman removed this from the 2.0.1 milestone Jun 19, 2019
@picman
Copy link
Collaborator

picman commented Jun 19, 2019

I've just gone through the code...

  1. Linked files are included into the archive if hadn't been already added. So eg.:
dir1/file1
link1->dir1/file1

will produce an archive containing just

dir1/file1

and not this as probably expected. But links are not supported; see below.

dir1/file1
file1

But, if we select just the link to zip:

link1->dir1/file1

the archive will contain the file:

file1
  1. Only files from the current project are added to the archive.
  2. The present version of rubyzip; library used for the compression doesn't support links:
def link(_fileName, _symlinkName)
  raise NotImplementedError, 'The link() function is not implemented'
end

@picman picman changed the title Download folders into a zip file wont include linked files Download folders into a zip file won't include linked files Jun 25, 2019
@picman picman changed the title Download folders into a zip file won't include linked files Downloaded folders in a zip file don't include linked files Jun 25, 2019
@picman picman removed their assignment Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants