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

Encryption: correctly include subfolders #81

Closed
japm48 opened this issue Aug 20, 2017 · 2 comments
Closed

Encryption: correctly include subfolders #81

japm48 opened this issue Aug 20, 2017 · 2 comments
Milestone

Comments

@japm48
Copy link
Contributor

japm48 commented Aug 20, 2017

yadm encrypt will fail if the encrypt file contains folders or patterns that evaluate to folders.

ls on them will list the directory contents, not the full path.

To reproduce:

mkdir -p ~/mysecrets/a/
echo something > ~/mysecrets/a/sshkey
echo 'mysecrets/' > .yadm/encrypt # Note that 'mysecrets/*' would also fail
yadm encrypt

I'm writing a simple patch/pull request to use ls -d instead of plain ls. This way the folder is not recursed but the entire directory structure is correctly placed in the encrypted tar file.
I believe this doesn't break anything as it treats regular files as before; I tried with several tests, but I can never be 100% sure, so please review.

@TheLocehiliosan
Copy link
Owner

Thanks for the contribution.

It doesn't break any of the current test cases. I'll write a test case for this specifically, and plan to include it in 1.12.0.

TheLocehiliosan added a commit that referenced this issue Sep 4, 2017
Add support for directories in .yadm/encrypt
TheLocehiliosan added a commit that referenced this issue Oct 24, 2017
Update version number and update documentation

* Add basic Zsh completion (#71, #79)
* Support directories in `.yadm/encrypt` (#81, #82)
* Support exclusions in `.yadm/encrypt` (#86)
* Improve portability with printf (#87)
* Eliminate usage of `eval` and `ls`
TheLocehiliosan added a commit that referenced this issue Oct 25, 2017
Update version number and update documentation

* Add basic Zsh completion (#71, #79)
* Support directories in `.yadm/encrypt` (#81, #82)
* Support exclusions in `.yadm/encrypt` (#86)
* Improve portability with printf (#87)
* Eliminate usage of `eval` and `ls`
@TheLocehiliosan
Copy link
Owner

This has been released in 1.12.0.

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