Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Possible bug with symlinks on linux ?
Possible bug with symlinks on linux ? [message #35101] |
Wed, 11 January 2012 14:07  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
TheIde opens correctly symlinks on Linux; when saving them it overwrites the symlink with the saved file instead of working on the linked one.
So, if I have this scenario :
and in another folder
anotherdir/aFile.cxx where aFile.cxx is a symlink to former one
upon saving, the 'anoherdir/aFile.cxx' link is replaced with a standard file 'aFile.cxx'. I guess it should instead update the original (linked) file.....
The correct solution would be to truncate the file to 0 length bytes and then overwrite it, instead of (what I think happens...) deleting it and then recreating.
Max
[Updated on: Wed, 11 January 2012 14:13] Report message to a moderator
|
|
|
Re: Possible bug with symlinks on linux ? [message #35175 is a reply to message #35101] |
Thu, 19 January 2012 08:46   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
mdelfede wrote on Wed, 11 January 2012 08:07 | TheIde opens correctly symlinks on Linux; when saving them it overwrites the symlink with the saved file instead of working on the linked one.
So, if I have this scenario :
and in another folder
anotherdir/aFile.cxx where aFile.cxx is a symlink to former one
upon saving, the 'anoherdir/aFile.cxx' link is replaced with a standard file 'aFile.cxx'. I guess it should instead update the original (linked) file.....
The correct solution would be to truncate the file to 0 length bytes and then overwrite it, instead of (what I think happens...) deleting it and then recreating.
Max
|
The problem is that if there is a crash (e.g. power shutdown), file gets lost.
theide now saves files in this way: First, it saves the file, adding ".$tmp" to the filename. Then, only if save is successful, deleted the file and renames saved file.
I guess that what we really need is to create symlink for ".$tmp"....
Mirek
|
|
|
Re: Possible bug with symlinks on linux ? [message #35178 is a reply to message #35175] |
Thu, 19 January 2012 17:31   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
mirek wrote on Thu, 19 January 2012 08:46 |
The problem is that if there is a crash (e.g. power shutdown), file gets lost.
theide now saves files in this way: First, it saves the file, adding ".$tmp" to the filename. Then, only if save is successful, deleted the file and renames saved file.
I guess that what we really need is to create symlink for ".$tmp"....
Mirek
|
True.... we should operate directly on linked file instead, but I've (yet) no idea on how to get it.
As the link is symbolic, is just an alias, so doing your mechanics on linked file would do the job without problems, the link will still point to the right file once renamed.
Max
|
|
|
|
|
Goto Forum:
Current Time: Sat May 10 14:01:53 CEST 2025
Total time taken to generate the page: 0.00687 seconds
|