Merge lp:~mandel/ubuntuone-windows-installer/fix_xp_paths into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Approved by: Rick McBride
Approved revision: 71
Merged at revision: 79
Proposed branch: lp:~mandel/ubuntuone-windows-installer/fix_xp_paths
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/fix_updater_checksum
Diff against target: 30 lines (+4/-2)
1 file modified
src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs (+4/-2)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/fix_xp_paths
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Stuart Colville (community) Approve
Review via email: mp+34406@code.launchpad.net

Description of the change

Fixes the issue that we find with the XP paths due to the fact that they have spaces in them.

To post a comment you must log in.
Revision history for this message
Stuart Colville (muffinresearch) wrote :

tests pass, +1

review: Approve
Revision history for this message
Rick McBride (rmcbride) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs'
2--- src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-09-02 11:54:43 +0000
3+++ src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-09-02 11:54:43 +0000
4@@ -204,6 +204,8 @@
5 // TODO: Do not store oauth in the env vars!!!!
6 var oneDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
7 "UbuntuOne");
8+ // ensure that the path can be handled by the python code
9+ oneDir = oneDir.Replace("\\", "\\\\");
10 if (!Directory.Exists(oneDir))
11 {
12 Directory.CreateDirectory(oneDir);
13@@ -218,7 +220,7 @@
14 {
15 WorkingDirectory = @"C:\Program Files\Canonical\UbuntuOne\Client\U1Sync",
16 FileName = @"C:\Program Files\Canonical\UbuntuOne\Client\U1Sync\main.exe",
17- Arguments = String.Format(" --init {0} --oauth {1}",
18+ Arguments = String.Format(" --init \"{0}\" --oauth {1}",
19 oneDir,
20 Environment.GetEnvironmentVariable("UbuntuOne", EnvironmentVariableTarget.User)),
21 UseShellExecute = false,
22@@ -239,7 +241,7 @@
23 {
24 WorkingDirectory = @"C:\Program Files\Canonical\UbuntuOne\Client\U1Sync",
25 FileName = @"C:\Program Files\Canonical\UbuntuOne\Client\U1Sync\main.exe",
26- Arguments = String.Format("{0} --oauth {1}",
27+ Arguments = String.Format("\"{0}\" --oauth {1}",
28 oneDir,
29 Environment.GetEnvironmentVariable("UbuntuOne", EnvironmentVariableTarget.User)),
30 UseShellExecute = false,

Subscribers

People subscribed via source and target branches

to all changes: