Hi Fabian,
On 2012-01-30 Fabian S. wrote:
>
> can someone verify that EDM dosn't work very well with hard or
> symbolic-links under linux?
The behavior you describe is common across a large number of programs because
that's how Posix file and directory operations that keep backups work. If you
want a save to overwrite a file through a soft-link you'll need to use a soft-
link pointing to the parent directory, not directly to the file itself.
> What I did:
> created a file and reused it in different projects via link. One day I
> edited not the source file rather the link and saved it with "save",
> thus breaking the link.
>
> original state:
> ~/file_lnk.edl ---> /lib/file.edl
>
> 1st save:
> ~/file_link.edl
> ~/file_lnk.edl~ ---> /lib/file.edl
During the save operation EDM renamed the original file (i.e. the link) to its
backup name, and created a new file with the updated version. This is much
more efficient than copying the data out of the old file to the backup name
and then overwriting its contents, and the old data is much less likely to be
accidentally lost if the OS crashes in the middle of the save operation.
> 2nd save:
> ~/file_link.edl
> ~/file_lnk.edl~
Same as before, except the rename caused the original backup filename (the
link) to be deleted and the save name reused for the 2nd updated version.
> it seems to happen with softlinks as well as with symlinks. With
> symlinks it's easier to investigate. Using hardlinks it helps using
> "stat /lib/file.edl" to see if the file has links and "find / -samefile
> /lib/file.edl" to see where are these pointing to.
In this case soft links and hard links behave the same, because the backup
operation involves a rename (which just changes the directory entry) and not a
copy. Doing it any other way would be slower and also increase the risk that
the file contents could get destroyed.
HTH,
- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham
- References:
- EDM dosn't handle file system links Fabian S.
- Navigate by Date:
- Prev:
EDM dosn't handle file system links Fabian S.
- Next:
New asynEnumStrings interface? Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
EDM dosn't handle file system links Fabian S.
- Next:
New asynEnumStrings interface? Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|