[Xfce4-commits] <postler:master> Parse file:// URIS passed with attach= correctly
Christian Dywan
noreply at xfce.org
Tue Dec 14 20:52:04 CET 2010
Updating branch refs/heads/master
to ae401eb7eb1ac8495d2d24290e0d072f86560a60 (commit)
from e02f5cecab1d62b3627ea1ccb7e6a964b1f06885 (commit)
commit ae401eb7eb1ac8495d2d24290e0d072f86560a60
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Dec 13 21:13:19 2010 +0100
Parse file:// URIS passed with attach= correctly
postler/postler-composer.vala | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 573ba3f..cb6ffb5 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -554,15 +554,13 @@ public class Postler.Composer : Gtk.Window {
else if (name == "subject")
entry = entry_subject;
else if (name == "attach") {
- if (Path.is_absolute (data) && FileUtils.test (data, FileTest.EXISTS)) {
- insert_attachment (data);
+ string filename = data.has_prefix ("file:///")
+ ? data.substring (7, -1) : data;
+ if (Path.is_absolute (filename)
+ && FileUtils.test (filename, FileTest.EXISTS)) {
+ insert_attachment (filename);
return true;
}
- else if (data.has_prefix ("file:///")) {
- string filename = data.substring (8, -1);
- if (FileUtils.test (filename, FileTest.EXISTS))
- return true;
- }
GLib.warning (_("File %s doesn't exist"), data);
return false;
}
More information about the Xfce4-commits
mailing list