Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#90 handle hardlinks

open
nobody
None
5
2003-09-23
2003-09-23
Bert Wesarg
No

this patch handles hardlinks > 1, if the file has more
than one hardlink and the user select unlink, the saved
file is a new file, and the other hardlinks are untouched

there are 3 modes:
"ignore" -- ignore this patch
"ask" -- ask the user to unlink
"unlink" -- unlink withot ask the user

if the user is asked for unlinking and select no, he is
no more ask for this file

Discussion

  • Bert Wesarg
    Bert Wesarg
    2003-09-23

    hardlink patch CVS BETA-5-4

     
    Attachments
  • Logged In: NO

    Hum... This patch seems to be very close to a feature which
    is missing in NEdit. If you open two times the same file
    using different paths, NEdit do not recognize that the two
    files are the same. But if it was possible to get rid of the
    hardlinks, then a better comparaison would be possible.

    I didn't find such a function anywhere:
    char * getRidOfHardLink(const char* path)

    Is there something close to that in your patch?

    Frank

     
  • Bert Wesarg
    Bert Wesarg
    2003-09-24

    hardlink patch CVS BETA-5-4

     
  • Bert Wesarg
    Bert Wesarg
    2003-09-24

    Logged In: YES
    user_id=122956

    changes in 0.2:
    handle also in save as situations

    @Frank:

    the relation between filename and inode is a one way
    relation, i know nothing to get all filenames for one inode

    a possible solution for the problem with two open files than
    link to the same inode, is to check then inode from the file
    currently open and all other opened files and then ask the
    user, i can try this for the next patch

    bert

     
  • Bert Wesarg
    Bert Wesarg
    2003-09-26

    Logged In: YES
    user_id=122956

    changes in 0.3:
    check hardlinks befor open an file and compare the inode
    with all other opened files

    there ist one problem with nc -wait and open the other
    window with the same inode, the wait for open works, but for
    close, the client wait for the wrong atom and i cant notify
    the client that he must wait for a other atom, for now the
    client hang until his timeout, if you will change this to
    immediatly return, you must uncomment the line 433 in the
    patch file (line 389 in the patched source/server.c file)

     
  • Bert Wesarg
    Bert Wesarg
    2003-09-26

    hardlink patch CVS BETA-5-4

     
  • Bert Wesarg
    Bert Wesarg
    2007-01-30

    0.5

     
  • Bert Wesarg
    Bert Wesarg
    2007-01-30

    Logged In: YES
    user_id=122956
    Originator: YES

    rebase to CVS HEAD + the last fix for the "#1645661 Repeated File Open fails" bug
    File Added: handle_hardlinks.patch