[Kst] [Bug 221689] Relative and absolute data file paths in kst

Nicolas Brisset nicolas.brisset at eurocopter.com
Thu Jan 7 18:14:53 CET 2010


https://bugs.kde.org/show_bug.cgi?id=221689





--- Comment #1 from Nicolas Brisset <nicolas brisset eurocopter com>  2010-01-07 18:14:52 ---
(copy/pasted from Don's email on the list
http://mail.kde.org/pipermail/kst/2009-September/016558.html)

I'd like to see a kst with a flexible, adaptable approach to paths.
Specifically:

1) kst should honour the method by which users specify paths.  An
absolute path specified should be saved as absolute:

  $ kst -y 1 /tmp/datafile

as should a relative one:

  $ kst -y 1 ./datafile

(Presumably the user has a better understanding of whether absolute or
relative is more appropriate.)

2) Store paths to files selected with the file selection widget relative
to some known base; store the base path, too.  Store kst's cwd in the
file, too, while your at it.

Then, when the .kst file is loaded later, attempt to find a data source
specified by relative path by trying different bases (in some specified
order, though not necessarily this one):

* the base path to the relative file stored in the .kst file (this is
  effectively and absolute path)
* the current working directory (kst 2.x style)
* the cwd stored in the .kst file (another form of "absolute path")
* the directory containing the .kst file (Josh style)

3) If this is done, there needs to be a facility in kst to allow users
to rewrite data source paths, so that they can change absolute paths to
relative ones, &c.

Bottom line: there are cases were absolute paths work best, and cases
where relative paths work best.  Restricting yourself to one or the
other will always create problems.  Be flexible.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kst mailing list