Files are not written as binary
Bug #802728 reported by
Roberto Alsina
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
Fix Released
|
High
|
Manuel de la Peña |
Bug Description
When syncing a file created on Linux to Windows, the EOLs are being converted. This corrupts every non-text file.
Here is the example file created on Linux (14 bytes):
>>> print repr(open(
'Line 1\nLine 2\n'
And here is the same file after it's synced to windows:
>>> print repr(open(
'Line 1\r\nLine 2\r\n'
Probably a ' b' flag missing in some open call.
Related branches
lp://staging/~mandel/ubuntuone-client/fix-802728
- Natalia Bidart (community): Approve
- Roberto Alsina (community): Approve
-
Diff: 227 lines (+80/-13)3 files modifiedtests/syncdaemon/test_fsm.py (+65/-0)
ubuntuone/syncdaemon/file_shelf.py (+3/-2)
ubuntuone/syncdaemon/filesystem_manager.py (+12/-11)
Changed in ubuntuone-client: | |
assignee: | nobody → Manuel de la Pena (mandel) |
importance: | Undecided → High |
status: | New → Triaged |
tags: | added: u1-zomg-windows |
Changed in ubuntuone-client: | |
status: | Triaged → In Progress |
Changed in ubuntuone-client: | |
status: | In Progress → Fix Committed |
Changed in ubuntuone-client: | |
milestone: | none → 1.7.1 |
Changed in ubuntuone-client: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Is more probable that some code is not using the os_helper.open_file method which adds the 'b' in the mode if not present. Lets hope that grep can return the exact places for this.