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

            Bug ID: 358984
           Summary: Saving changes inode number of hard linked files
           Product: KBibTeX
           Version: unspecified
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]

Not sure this is actually a bug or expected behaviour.

I have a .bib file in a directory and I have created a hard linked .bib in
another directory. After doing this both have the same inode number. Modifying
one of the files, doesn't matter which, changes its inode, breaking the link.

System:

Git revision 90e6d7a (0.7)
KDE 4.14.10

Observed same behaviour with version 0.6, installed from openSUSE 13.1 KDE
repo.




Reproducible: Always

Steps to Reproduce:
1. Create a hard link to a .bib file in a different directory (ln
/path/to/bibfile.bib linkedfile.bib). 
2. Observe bibfile.bib and linkedfile.bib have the same inode.
3. Open one of them, modify and save.
4. Observe that the inode of the modified file is now different.

Actual Results:  
Inode number of hardlinked file changes upon save.

Expected Results:  
Inode number of hardlinked files should remain the same.

Use case: I keep my .bib files in a `references' directory, but I need a .bib
file in a project directory which is under version control, so that I can push
and pull changes to the .bib file, and I don't want to maintain two files.
Symlinking to the file in the `references' directory doesn't work, since only
the reference to the symlinked file is pushed. Solution: create a hard link to
the `central' file.

Note: creating the link in the 'central' dir to the file in the project
directory has the same result. 

Workaround: creating a symlink in 'central' to the file in the project
directory will do the job.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to