~diegosarmentero/ubuntuone-client/darwin2-fsevents

« back to all changes in this revision

Viewing changes to ubuntuone/platform/__init__.py

  • Committer: Diego Sarmentero
  • Date: 2012-06-22 14:07:26 UTC
  • mfrom: (1261.2.3 ubuntuone-client)
  • Revision ID: diego.sarmentero@canonical.com-20120622140726-3m0w05qwslv24x8d
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import os
32
32
import sys
33
33
 
34
 
from ubuntu_sso.xdg_base_directory import xdg_home
 
34
from dirspec.utils import user_home
35
35
 
36
36
# very hackish way to avoid "import *" to satisfy pyflakes
37
37
# and to avoid import ubuntuone.platform.X as source (it wont work)
62
62
    if not path.startswith(tilde) or \
63
63
    (len(path) > 1 and path[1:2] != os.path.sep):
64
64
        return path
65
 
    result = path.replace('~', xdg_home, 1)
 
65
    result = path.replace('~', user_home, 1)
66
66
 
67
67
    assert isinstance(result, str)
68
68
    try: