-
Notifications
You must be signed in to change notification settings - Fork 177
cleanup tmp files #570
cleanup tmp files #570
Conversation
|
Here is another related bug which we should fix here or in a separate PR ping me when ready for a review. |
|
how is it going with this one? I received you ping on IRC and replied, but maybe you were offline. I suggest using Riot to never miss IRC messaged. |
5edcdc5 to
5fe532c
Compare
Thanks Krasi |
04db4e9 to
6ad3d42
Compare
6ad3d42 to
c57bd62
Compare
krasi-georgiev
left a comment
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.
did you test that
if err := os.RemoveAll(to); err != nil {
return err
}
is not needed?
|
btw @zhulongcheng don't forget that tomorrow the 9th is the last day for the GSOC proposal submissions. Feel free to ping me on IRC with yours so I can give some feedback before submitting. |
|
a file conflict and did you test that is not needed? |
|
Will rebase ASAP. About test: |
|
so IIUC we do need it since fileutil.Rename should also handle dirs. |
c57bd62 to
27323fa
Compare
How about |
|
do you mean to use Rename only for files and Replace for files or dirs? is there no way to combine these into a single func? |
|
actually maybe best to keep separate, this way when Rename will fail if the destination exists and Replace will delete destination and rename source to destination. |
7912b39 to
5b47f49
Compare
|
Maybe we need to reconsider whether we still need the If the destination file/dir exists, should use |
|
I am concerned that this might lead to unexpected data loss. For example if the generated destination ULID of a block collapses with an existing block Replace will just delete the destination without us even knowing about this leading to data loss. |
|
I want to simplify this pr.
because the implementation of this will make this pr clear and be reviewed friendly. |
|
new a separate issue to discuss implementations and usages of Rename and Replace. |
|
ok |
34f13c2 to
0e2749c
Compare
Signed-off-by: zhulongcheng <[email protected]>
0e2749c to
3e7560d
Compare
|
if #583 turns out to be a good solution to inject FS errors can use it to write a test for this PR. |
|
LGTM ping @gouthamve , @codesome , @bwplotka |
|
since it is a low risk PR , will merge and if anymore changes are needed will open a new one. |
bwplotka
left a comment
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.
LGTM
Closes #565