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

Enhance FilesFromDisk (close #331) - #332

Merged
mholt merged 2 commits into
masterfrom
windows
Apr 15, 2022
Merged

mholt merged 2 commits into
masterfrom
windows

Conversation

@mholt

@mholt mholt commented Apr 14, 2022 •

Copy link
Copy Markdown
Owner

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
Copy Markdown

@mholt I am working in Linux too :(

@mholt

mholt commented Apr 14, 2022

Copy link
Copy Markdown
Owner Author

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

@nicola-spb

nicola-spb commented Apr 14, 2022 •

Copy link
Copy Markdown

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

mholt commented Apr 14, 2022

Copy link
Copy Markdown
Owner Author

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

⌂ 换网址