Commit 0a0b9bcf authored by Ingo Meyer's avatar Ingo Meyer

Merge branch 'develop'

parents 6f315f7c 594ed6bb
__version_info__ = (0, 8, 4)
__version_info__ = (0, 8, 5)
__version__ = '.'.join(map(str, __version_info__))
......@@ -358,10 +358,10 @@ class Calculation(object):
"""
allresults = []
for filename, frames in calcsettings.datasets.iteritems():
filepath = os.path.abspath(filename)
filepath = core.file.get_abspath(filename)
fileprefix = os.path.basename(filename).rsplit(".", 1)[0]
if calcsettings.exportdir is not None:
exportdir = os.path.abspath(calcsettings.exportdir)
exportdir = core.file.get_abspath(calcsettings.exportdir)
# replace asterisks with directories
dirlist = os.path.dirname(filepath).split("/")
while "*" in exportdir:
......@@ -374,7 +374,7 @@ class Calculation(object):
exportdir = os.path.dirname(filepath)
if calcsettings.exporthdf5:
efpath = os.path.join(exportdir, fileprefix + ".hdf5")
efpath = os.path.abspath(efpath)
efpath = core.file.get_abspath(efpath)
# copy atoms into HDF5 file
exportfile = core.file.HDF5File.fromInputFile(efpath, filepath)
# use HDF5 file as input
......@@ -457,7 +457,7 @@ class CalculationCache(object):
**Returns:**
If a cache file for the given input file exists.
"""
sourcefilepath = os.path.abspath(filepath)
sourcefilepath = core.file.get_abspath(filepath)
cachefilepath = self.abspath(self.cachefile(sourcefilepath))
return os.path.isfile(cachefilepath)
......@@ -473,7 +473,7 @@ class CalculationCache(object):
A :class:`core.file.HDF5File` object.
If no cache file exist for the input file, a new one is created.
"""
sourcefilepath = os.path.abspath(filepath)
sourcefilepath = core.file.get_abspath(filepath)
cachefilepath = self.abspath(self.cachefile(sourcefilepath))
if sourcefilepath not in self.index:
self.index[sourcefilepath] = cachefilepath
......@@ -483,7 +483,7 @@ class CalculationCache(object):
return cachefile
def abspath(self, filename):
return os.path.abspath(os.path.join(self.directory, filename))
return os.path.abspath(os.path.join(core.file.get_abspath(self.directory), filename))
def cachefile(self, filepath):
return sha256(filepath).hexdigest() + ".hdf5"
......
......@@ -540,7 +540,7 @@ class File(object):
if e not in cls.types:
raise ValueError("Unknown file format")
FileClass = cls.types[e]
return FileClass(os.path.abspath(filepath))
return FileClass(filepath)
@classmethod
def exists(cls, filepath):
......@@ -555,5 +555,6 @@ class File(object):
`True` if the file exists and there is a subclass of :class:`InputFile`
associated with the filename ending.
"""
filepath = get_abspath(filepath)
name = os.path.basename(filepath)
return os.path.isfile(filepath) and name.split(".")[-1] in cls.types
......@@ -256,7 +256,7 @@ class CalculationSettingsDialog(QtGui.QDialog):
def timestamps(self, center_based=False):
return [self.control.calculation.calculatedframes(
os.path.abspath(fn),
file.get_abspath(fn),
self.resolution,
not center_based,
center_based).prettystrings()
......
......@@ -39,7 +39,7 @@ import core.calculation
def start_gui():
core.file.SEARCH_PATH = os.getcwd()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
os.chdir(os.path.dirname(os.path.realpath(__file__)))
app = QtGui.QApplication(sys.argv)
control = Control()
window = main_window.MainWindow(control)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment