-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
LogCleaner: Fix relative paths and add a new test #754
Conversation
Codecov Report
@@ Coverage Diff @@
## master #754 +/- ##
==========================================
+ Coverage 72.65% 72.74% +0.09%
==========================================
Files 17 17
Lines 3211 3211
==========================================
+ Hits 2333 2336 +3
+ Misses 878 875 -3
Continue to review full report at Codecov.
|
387bca3
to
9b4df1c
Compare
What does this mean exactly, i.e., what is the intended behavior? |
9b4df1c
to
d3849f5
Compare
I've updated the description of this PR. if the user sets the log destination using a relative path (e.g., "testdir/"), then the log cleaner will scan "." for logs instead of "testdir/" |
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 you please also rebase onto current master and squash all the commits?
18581d0
to
384deef
Compare
I've squashed all the commits into one, and renamed |
384deef
to
b791102
Compare
Signed-off-by: Marco Wang <[email protected]>
Thanks! |
Overview
Currently, if the user sets the log destination using a relative path (e.g., "testdir/"), then the log cleaner will scan "." for logs instead of "testdir/". This PR fixes the problem and adds a new test.
Root Cause
pos
ofstring::find_last_of
indicates the position at which the search is to finish.string::npos
instead of0
at line 1333.glog/src/logging.cc
Lines 1333 to 1341 in 3362cc6
Fix
string::npos
instead of0
at line 1333.src/cleanup_with_prefix_unittest.cc
)