Bug 318144 - relative paths of source files are not correct in some cases
Summary: relative paths of source files are not correct in some cases
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: datasources (show other bugs)
Version: 2.0.6
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 15:49 UTC by Till Schäfer
Modified: 2013-05-31 21:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2013-04-10 15:49:02 UTC
data sources are stored with absolute paths in the .kst project file. This leads to strange behavior when moving a folder in which both the source and kst files are. Another situation in which this behavior make kst fail to find the source files is when mounting a drive on a different mount point.

I propose to save the source files relative to the kst file location. 

Reproducible: Always
Comment 1 Nicolas Brisset 2013-05-21 20:12:44 UTC
This should no longer be the case since commit 1162736 from 2010-08-12, which should correspond to an early version 2.0. I have just tried here and with ASCII and netcdf I get both relative and absolute file paths.
Could you please describe the bug in a more detailed way?
Comment 2 Till Schäfer 2013-05-24 16:14:43 UTC
I analyzed the problem again and found out that for some files the relative path is working and for some not. 
It seems that under some conditions that the relative path is wrong and relative to my home directory instead of being relative to the kst file.
Comment 3 Till Schäfer 2013-05-24 16:23:58 UTC
In addition to my last post: currently i am not able to reproduce this behavior.
Comment 4 Nicolas Brisset 2013-05-24 22:25:20 UTC
Funny enough, no later than today a colleague of mine came to the same conclusion: if you call up the kst file from another directory, the relative path will not work.
Should be easy to fix.
Comment 5 Nicolas Brisset 2013-05-31 21:40:58 UTC
SVN commit 1356655 by brisset:

Set the current directory at the right place so that the "fileRelative" attribute saved in the .kst file 
always works, even when kst2 is called from a different dir than the one where the .kst resides.
Fix some indentation issues on the way.


 M  +2 -1      document.cpp  
 M  +1 -5      mainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1356655