Skip to content

IDE tab as symbolic link is overwritten wit real file on "Save" #5478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Copmic opened this issue Oct 13, 2016 · 3 comments
Closed

IDE tab as symbolic link is overwritten wit real file on "Save" #5478

Copmic opened this issue Oct 13, 2016 · 3 comments
Labels
Component: IDE The Arduino IDE

Comments

@Copmic
Copy link

Copmic commented Oct 13, 2016

setup is:
/project1/project1.ino
/project1/localinclude1.h
/project1/include2.h
/include2.h

where /project1/include2.h is a symbolic link to /include2 and
/project1/localinclude1.h is a "real" file.

project1.ino includes both .h via

include "localinclude1.h"

include "include2.h"

system is Linux Debian Jessie 64bit; arduino ide 1.6.11; file system is ext4

If I open /project1/project1.ino in arduino ide then all three files (project1.ino, localinclude1.h, include2.h) are shown in ide in tabs (= correctly).
I can edit and save all three files independently. If I save project1.ino or localinclude1.h from the ide all is fine and /project1/include2.h is still a symbolic link.

But if I save include2.h from the ide the symbolic link is replaces by a copy of /include2.h.
Thus, I then still have
/project1/project1.ino
/project1/localinclude1.h
/project1/include2.h
/include2.h

but now /project1/include2.h is a "real" file (not a link any more) and is a copy of /include2.h.

This bug is really hard to recognize, as at first everything seems to be ok and continues to work.
Only if later you change something in /include2.h it won't show up in /project1/include2.h an v.v.

@facchinm
Copy link
Member

Hi @Copmic , I agree that soft links should be saved by following the link and saving the actual file. However, this scenario is quite uncommon and platform-dependant, so the solution may be less than obvious. I changed the title into something more explicit

@facchinm facchinm changed the title include overwrites symbolic links with copies of files IDE tab as symbolic link is overwritten wit real file on "Save" Oct 20, 2016
@facchinm facchinm added the Component: IDE The Arduino IDE label Oct 20, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Nov 4, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Nov 7, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Nov 7, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Nov 7, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Nov 23, 2016
@cmaglie cmaglie added this to the Release 1.6.14 milestone Dec 19, 2016
@Madouc
Copy link

Madouc commented Feb 8, 2017

Arduino 1.8.1 on windows 10 still exhibits this behavior.
filesystem is NTFS

symlinks created:
'mklink global.h ..\libraries\mcp2515\global.h

but overwritten on save.

@45gfg9
Copy link
Contributor

45gfg9 commented Jul 29, 2019

Problem consists to this day.
See #8535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

No branches or pull requests

5 participants