Commit dbaa684
committed
Unlink the temp file sooner
We only need the temp file to be present on the file system to run
xdg-mime on it. Once we have done that, we can unlink it and simply use
an fd to refer to it, seeking to the beginning each time.
This makes us more robust against wl-copy crashing (or getting killed),
in which case the file would be kept on the file system; this should no
longer be the case with this patch.
Related to #1551 parent 065d6da commit dbaa684
3 files changed
+36
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 84 | | |
101 | | - | |
| 85 | + | |
102 | 86 | | |
103 | 87 | | |
104 | 88 | | |
105 | 89 | | |
106 | | - | |
| 90 | + | |
107 | 91 | | |
108 | 92 | | |
109 | 93 | | |
| |||
244 | 228 | | |
245 | 229 | | |
246 | 230 | | |
| 231 | + | |
247 | 232 | | |
248 | 233 | | |
249 | 234 | | |
| |||
266 | 251 | | |
267 | 252 | | |
268 | 253 | | |
269 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
| |||
300 | 306 | | |
301 | 307 | | |
302 | 308 | | |
303 | | - | |
304 | 309 | | |
305 | 310 | | |
0 commit comments