1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 06_expand_homedir_in_open.dpatch by Christopher James Halse Rogers <raof@ubuntu.com>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Expand ~ when opening a TextItem as a file or folder.
6
## DP: xdg-open obviously doesn't expand ~ itself.
9
diff -urNad gnome-do-0.6.1.0~/Do.Addins/src/Do.Universe/OpenAction.cs gnome-do-0.6.1.0/Do.Addins/src/Do.Universe/OpenAction.cs
10
--- gnome-do-0.6.1.0~/Do.Addins/src/Do.Universe/OpenAction.cs 2008-10-07 08:03:00.000000000 +1100
11
+++ gnome-do-0.6.1.0/Do.Addins/src/Do.Universe/OpenAction.cs 2008-10-10 12:47:40.000000000 +1100
13
} else if (item is ITextItem) {
14
// item is a valid file or folder path.
15
toOpen = (item as ITextItem).Text
16
+ .Replace ("~", Paths.UserHome)
17
+ .Replace ("\\", "\\\\")
18
+ .Replace ("'", "\\'")
19
+ .Replace ("\"", "\\\"")
20
.Replace (" ", "\\ ");
22
Util.Environment.Open (toOpen);