mailr22248 - in /branches/double_rotor: ./ lib/io.py specific_analyses/relax_disp/disp_data.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 21, 2014 - 20:26:
Author: bugman
Date: Fri Feb 21 20:26:45 2014
New Revision: 22248

URL: http://svn.gna.org/viewcvs/relax?rev=22248&view=rev
Log:
Merged revisions 22247 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r22247 | bugman | 2014-02-21 20:25:28 +0100 (Fri, 21 Feb 2014) | 9 lines
  
  Fix for bug #21704, the failure of the GUI analyses when the home directory 
'~' character is used.
  
  The bug is located at https://gna.org/bugs/?21704.
  
  The problem is located in many parts of the program, and other problematic 
areas may still be
  present.  In all cases where the directory or file is accessed, the 
os.path.expanduser() function
  must be called.
........

Modified:
    branches/double_rotor/   (props changed)
    branches/double_rotor/lib/io.py
    branches/double_rotor/specific_analyses/relax_disp/disp_data.py

Propchange: branches/double_rotor/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Feb 21 20:26:45 2014
@@ -1,1 +1,1 @@
-/trunk:1-22245
+/trunk:1-22247

Modified: branches/double_rotor/lib/io.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/lib/io.py?rev=22248&r1=22247&r2=22248&view=diff
==============================================================================
--- branches/double_rotor/lib/io.py (original)
+++ branches/double_rotor/lib/io.py Fri Feb 21 20:26:45 2014
@@ -1,7 +1,7 @@
 from __future__ import absolute_import
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2003-2013 Edward d'Auvergne                                  
 #
+# Copyright (C) 2003-2014 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -308,6 +308,9 @@
     # No directory given.
     if dir == None:
         return
+
+    # Expand any ~ characters.
+    dir = expanduser(dir)
 
     # Make the directory.
     try:

Modified: branches/double_rotor/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/specific_analyses/relax_disp/disp_data.py?rev=22248&r1=22247&r2=22248&view=diff
==============================================================================
--- branches/double_rotor/specific_analyses/relax_disp/disp_data.py (original)
+++ branches/double_rotor/specific_analyses/relax_disp/disp_data.py Fri Feb 
21 20:26:45 2014
@@ -53,6 +53,7 @@
 # Python module imports.
 from math import atan, floor, pi, sqrt
 from numpy import array, float64, int32, ones, zeros
+from os.path import expanduser
 from random import gauss
 from re import search
 import sys
@@ -1802,11 +1803,13 @@
     # Write the file.
     script_grace2images(file=file)
 
-    # Close the batch script, then make it executable.
+    # Close the batch script, then make it executable (expanding any ~ 
characters).
     file.close()
     if dir:
+        dir = expanduser(dir)
         chmod(dir + sep + file_name, S_IRWXU|S_IRGRP|S_IROTH)
     else:
+        file_name = expanduser(file_name)
         chmod(file_name, S_IRWXU|S_IRGRP|S_IROTH)
 
 




Related Messages


Powered by MHonArc, Updated Fri Feb 21 20:40:02 2014