-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add data directory excluding sessions to dump (#586) #587
Conversation
sessions dir is still in the data |
Works now. The issue was an unset I've hardcoded |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use uncommon abbreviations for variables :)
// Make sure we have all upper level directories. | ||
z.AddEmptyDir(dirPath) | ||
|
||
fis, err := dir.Readdir(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we call it files, err
instead?
if err != nil { | ||
return err | ||
} | ||
for _, fi := range fis { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same hear, file := range files
@bkcsoft Fixed, much cleaner now ;) |
LGTM |
We have to merge this at first. @bkcsoft if you have any further information, please open another issue. |
This includes the data directory inside a gitea dump. Sessions are excluded if the session provider is set to file and the session directory is a child of the data directory.
Closes #586