Merge lp:~facundo/ubuntuone-client/lr-dont-delete-partial-nopartialfile into lp:ubuntuone-client
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 736 |
Merged at revision: | 738 |
Proposed branch: | lp:~facundo/ubuntuone-client/lr-dont-delete-partial-nopartialfile |
Merge into: | lp:ubuntuone-client |
Diff against target: |
216 lines (+151/-6) 2 files modified
tests/syncdaemon/test_fsm.py (+125/-2) ubuntuone/syncdaemon/filesystem_manager.py (+26/-4) |
To merge this branch: | bzr merge lp:~facundo/ubuntuone-client/lr-dont-delete-partial-nopartialfile |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lucio Torre (community) | Approve | ||
Guillermo Gonzalez | Approve | ||
Review via email: mp+38834@code.launchpad.net |
Description of the change
Handle better errors on partial creation.
This has two sides:
- Leave the node in a better state if *any* error happens when touching disk: in this case, I moved the MD handling before the filesystem handling. So, from now, if something bad happens when creating the partial in the disk, the node will still be in SERVER state, and LR will re-download it.
- Support too long filenames: for this, specific code were added to the filename handling when the file is created: we trim the filename until the filesystem stops giving that error to us.
As the filename may be trimmed according to filesystem errors, it's not fully predictable any more. So, when that happens, it's stored in the metadata object.
Tests included for everything.
looks good, tests pass.