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

Support backwards compatibility when importing .tar.gz archives from previous version #84

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

felipecruz91
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Sep 21, 2022

Docker image tag(s) pushed:

docker/volumes-backup-extension:pr-84

Labels added to images:

org.opencontainers.image.title=volumes-backup-extension
org.opencontainers.image.description=Back up, clone, restore, and share Docker volumes effortlessly.
org.opencontainers.image.url=https://github.com/docker/volumes-backup-extension
org.opencontainers.image.source=https://github.com/docker/volumes-backup-extension
org.opencontainers.image.version=pr-84
org.opencontainers.image.created=2022-09-21T14:15:07.190Z
org.opencontainers.image.revision=2a9cc105a79c9106d1146c41afb4aaa8cdf9dad2
org.opencontainers.image.licenses=Apache-2.0

vm/internal/handler/import.go Outdated Show resolved Hide resolved
@@ -76,6 +76,13 @@ func (h *Handler) ImportTarGzFile(ctx echo.Context) error {
return err
}

//fileName := filepath.Base(path)
rmCmd := "rm -rf /vackup-volume/..?* /vackup-volume/.[!.]* /vackup-volume/*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command looks a bit over-complicated, why do we need this syntax ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to remove hidden and not-hidden files and folders. I've added a comment with an explanation.

@felipecruz91 felipecruz91 force-pushed the feature/import-backwards-compatibility branch from 8d0aeb6 to 9b3d1c5 Compare September 21, 2022 14:08
@felipecruz91 felipecruz91 force-pushed the feature/import-backwards-compatibility branch from 9b3d1c5 to bac89f3 Compare September 21, 2022 14:11
@felipecruz91 felipecruz91 merged commit 24488b3 into main Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants