Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Enhance FilesFromDisk (close #331) #332

Merged
merged 2 commits into from
Apr 15, 2022
Merged

Enhance FilesFromDisk (close #331) #332

merged 2 commits into from
Apr 15, 2022

Conversation

mholt
Copy link
Owner

@mholt mholt commented Apr 14, 2022

Now permit suffixing root on disk with separator to enumerate only
its contents and not to create that actual file in archive.

And attempt improving Windows compatibility. I don't have Windows handy so this'll have to be CI-based feedback.

@nicola-spb could you give this a try?

Now permit suffixing root on disk with separator to enumerate only
its contents and not to create that actual file in archive.

And attempt improving Windows compatibility.
@nicola-spb
Copy link

@mholt I am working in Linux too :(

@mholt
Copy link
Owner Author

mholt commented Apr 14, 2022

That's fine, I mostly want you to test the feature you requested.

@nicola-spb
Copy link

nicola-spb commented Apr 14, 2022

Yes it's work on Ubuntu.

Tested it:

files, err := archiver.FilesFromDisk(nil, map[string]string{
	"/path/on/disk/folder/": "",  // adding files to root in archive
})
files, err := archiver.FilesFromDisk(nil, map[string]string{
	"/path/on/disk/folder": "",  // adding files to "folder" in archive
})

@mholt
Copy link
Owner Author

mholt commented Apr 14, 2022

Perfect, thanks for verifying it does what you need!

I'll clean up the implementation and get them working on Windows. I might also work on the dot (.) situation but how complex it is depends whether it goes in this PR.

@mholt mholt merged commit f7aa48e into master Apr 15, 2022
@mholt mholt deleted the windows branch April 15, 2022 02:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants