KeyError on the root folder inside volume manager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
Fix Released
|
Critical
|
Manuel de la Peña |
Bug Description
The trace is:
2011-06-27 18:01:33,697 - ubuntuone.
2011-06-27 18:01:33,697 - ubuntuone.
Traceback (most recent call last):
File "C:\Users\
os.
File "C:\Users\
mdid = self._idx_
KeyError: '\\\\?\
This is caused becasue os.path.normpath will not normalize paths that starts with the \\\\?\\ prefix. Refer to the source code for details, but the key part is:
def normpath(path):
"""Normalize path, eliminating double slashes, etc."""
# Preserve unicode (if path is unicode)
backslash, dot = (u'\\', u'.') if isinstance(path, unicode) else ('\\', '.')
if path.startswith
# in the case of paths with these prefixes:
# \\.\ -> device names
# \\?\ -> literal paths
# do not do any normalization, but return the path unchanged
return path
We need to handle path normalization by our own, on the window side.
Related branches
- Roberto Alsina (community): Approve
- Natalia Bidart (community): Approve
-
Diff: 484 lines (+212/-25)10 files modifiedtests/platform/windows/test_os_helper.py (+18/-1)
tests/syncdaemon/test_fsm.py (+148/-0)
tests/syncdaemon/test_vm.py (+8/-4)
ubuntuone/platform/linux/__init__.py (+1/-0)
ubuntuone/platform/linux/os_helper.py (+5/-0)
ubuntuone/platform/windows/__init__.py (+1/-0)
ubuntuone/platform/windows/os_helper.py (+10/-1)
ubuntuone/syncdaemon/filesystem_manager.py (+14/-13)
ubuntuone/syncdaemon/interaction_interfaces.py (+2/-1)
ubuntuone/syncdaemon/volume_manager.py (+5/-5)
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 |
Trace extracted from http:// pastebin. ubuntu. com/633772/