Skip to content

A scanmail flag creation added. to let the system scheduler know that message base shall be scanned. Feature is enabled by defining 'scanflag' variable in config.#175

Open
uncleeugene wants to merge 1 commit intoaskovpen:masterfrom
uncleeugene:master

Conversation

@uncleeugene
Copy link

No description provided.

In case any new messages were written, a flag file will be created upon quitting
to let the system scheduler know that message base shall be scanned.
Feature is enabled by defining 'scanflag' variable in config.
return !info.IsDir()
}

func CreateFlagFile(filename string) error {
Copy link

Choose a reason for hiding this comment

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

exported function CreateFlagFile should have comment or be unexported

Copy link
Owner

Choose a reason for hiding this comment

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

Please add comment and tests to function

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 57.71%. Comparing base (fdd6aa5) to head (2d1134e).
Report is 32 commits behind head on master.

Files Patch % Lines
pkg/utils/other.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   56.72%   57.71%   +0.99%     
==========================================
  Files          15       15              
  Lines        1428     1594     +166     
==========================================
+ Hits          810      920     +110     
- Misses        490      545      +55     
- Partials      128      129       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


func CreateFlagFile(filename string) error {
if filename != "" {
_, err := os.Create(filename)
Copy link
Owner

Choose a reason for hiding this comment

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

Please add check if directory exists and file not exists

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.

2 participants