bugfix: dfget overwrite /dev/null#1254
Conversation
|
We found this is your first time to contribute to Dragonfly, @xuyixin1996 |
Codecov Report
@@ Coverage Diff @@
## master #1254 +/- ##
==========================================
- Coverage 48.43% 48.41% -0.02%
==========================================
Files 119 119
Lines 7573 7578 +5
==========================================
+ Hits 3668 3669 +1
- Misses 3608 3612 +4
Partials 297 297
Continue to review full report at Codecov.
|
| res = append(res, err) | ||
| } | ||
|
|
||
| if err := m.validateFileLength(formats); err != nil { |
There was a problem hiding this comment.
Please do not edit this file directory, you should update swagger.yml first, and then auto-generate this file:
https://github.com/dragonflyoss/Dragonfly/blob/master/apis/README.md
Signed-off-by: yixin.xu <yixin.xu@shopee.com>
Signed-off-by: yixin.xu <yixin.xu@shopee.com>
lowzj
left a comment
There was a problem hiding this comment.
I'm wondering in which scenario the flag --output should be set as /dev/null.
It may change the following codes to support writing /dev/null:
dfget/core#prepare: don't create target directory and temporary file/dfget/core/downloader/p2p_downloader#TargetWriter: it should not be run in this case
|
😄😄😄😄 |
|
@xuyixin1996 conflict happens, could you help to rebase to solve it? Thanks |
|
ping @xuyixin1996 |
Ⅰ. Describe what this PR did
/dev/nulland caused some issueⅡ. Does this pull request fix one issue?
N.A
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
N.A
Ⅳ. Describe how to verify it
before the patch, /dev/null will be a regular file
after the patch, /dev/null will not be changed
Ⅴ. Special notes for reviews