churchyard pushed to cura (master). "Handle files form the command line (#1213220)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Apr 20 07:28:08 UTC 2015


>From cca94d1fe7c90a1fdc80d4f775d095d122bf9a6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro at hroncok.cz>
Date: Mon, 20 Apr 2015 09:26:59 +0200
Subject: Handle files form the command line (#1213220)


diff --git a/cura b/cura
index 4e27529..322824e 100755
--- a/cura
+++ b/cura
@@ -1,5 +1,15 @@
 #!/usr/bin/python
 import os
-os.chdir("/usr/lib/python2.7/site-packages/")
+import sys
 import Cura.cura as cura
+
+# Make all paths absolute, we are gonna change the pwd
+for i in range(len(sys.argv)):
+    if os.path.exists(sys.argv[i]):
+        sys.argv[i] = os.path.abspath(sys.argv[i])
+
+# change the pwd
+os.chdir("/usr/lib/python2.7/site-packages/")
+
+# start cura
 cura.main()
diff --git a/cura.spec b/cura.spec
index 2023479..ab55207 100644
--- a/cura.spec
+++ b/cura.spec
@@ -1,6 +1,6 @@
 Name:           cura
 Version:        14.12.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        3D printer control software
 
 # Code is AGPLv3
@@ -107,6 +107,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
 %{_bindir}/%{name}
 
 %changelog
+* Mon Apr 20 2015 Miro Hrončok <mhroncok at redhat.com> - 14.12.1-3
+- Handle files form the command line (#1213220)
+
 * Mon Mar 30 2015 Miro Hrončok <mhroncok at redhat.com> - 14.12.1-2
 - Update the no firmware patch according to communication with Cura upstream
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/cura.git/commit/?h=master&id=cca94d1fe7c90a1fdc80d4f775d095d122bf9a6a


More information about the scm-commits mailing list