]> git.pld-linux.org Git - packages/emesene.git/commitdiff
- write to homedir if configured files dir not writable (which also defaults to ... auto/th/emesene-1_6_2-2
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 9 Jun 2010 16:38:42 +0000 (16:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    emesene.spec -> 1.16
    receivedFilesDir-writablecheck.patch -> 1.1

emesene.spec
receivedFilesDir-writablecheck.patch [new file with mode: 0644]

index fdb994b106eaf5f587385b25a27802242fd8077d..d921d1a3e636630019663ec08e27ff799f082de5 100644 (file)
@@ -1,10 +1,7 @@
-# TODO
-# - default download dir (if not reconfigured by user) is /usr/share/emesene,
-#   which is not writable, set to $HOME/Downloads by default
 Summary:       Instant messaging client for Windows Live Messenger (tm) network
 Name:          emesene
 Version:       1.6.2
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Applications/Networking
 URL:           http://www.emesene.org/
@@ -14,6 +11,7 @@ Patch0:               %{name}-desktop.patch
 Patch1:                setup-install.patch
 Patch2:                plugins-pyc.patch
 Patch3:                pythonpath.patch
+Patch4:                receivedFilesDir-writablecheck.patch
 BuildRequires: gettext
 BuildRequires: python-devel
 BuildRequires: python-modules
@@ -49,6 +47,7 @@ picture.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 cat <<'EOF' > emesene.sh
 #!/bin/sh
diff --git a/receivedFilesDir-writablecheck.patch b/receivedFilesDir-writablecheck.patch
new file mode 100644 (file)
index 0000000..59669c4
--- /dev/null
@@ -0,0 +1,13 @@
+--- emesene-1.6.2/FileTransfer.py~     2010-05-26 22:51:32.000000000 +0300
++++ emesene-1.6.2/FileTransfer.py      2010-06-09 19:24:32.826629398 +0300
+@@ -215,8 +215,8 @@
+         receivedFilesDir = os.path.expanduser(config.user['receivedFilesDir'])
+         # if directory is invalid, save to home directory
+-        if not os.path.exists(receivedFilesDir):
+-            print receivedFilesDir + ' does not exist. ' \
++        if not os.path.exists(receivedFilesDir) or not os.access(receivedFilesDir, os.W_OK):
++            print receivedFilesDir + ' does not exist or is not writable. ' \
+                 'Saving files to home directory.'
+             receivedFilesDir = os.path.expanduser('~/')
This page took 0.071261 seconds and 4 git commands to generate.