You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PDE erroneously detects changes in non-sketch files #2759
When exporting a sketch, new folders are created, but existing files aren't altered. The PDE pops up the "A file has been modified externally" message anyway.
This is also a problem in python mode, which compiles .py files into .class files in the sketch directory.
I don't have the code in front of me, but for exporting I suspect that the files are created then written to in 2 steps. Code could be added to ignore changes when exporting. For the python compilation I can tell it to ignore .pyc to prevent the popup on python compilation. I can look at it on next Monday
@pvrs12 This actually happens on windows for me. Probably only PDE files in the sketch folder should be watched? (I noticed that saving images triggered this, too.)
I came up with a possible fix for this. It now attempts to detect if the change was in the sketch or not before displaying any dialog. If it was in the sketch then it prompts for a reload. The other case in which it will prompt for a reload (which could cause false positives) is if the file was edited with gedit under linux (this is because of how gedit writes to the files and how the file detection is written in java)
Activity
benfry commentedon Aug 7, 2014
@pvrs12 thoughts here?
pvrs12 commentedon Aug 8, 2014
I don't have the code in front of me, but for exporting I suspect that the files are created then written to in 2 steps. Code could be added to ignore changes when exporting. For the python compilation I can tell it to ignore .pyc to prevent the popup on python compilation. I can look at it on next Monday
pvrs12 commentedon Aug 11, 2014
@kazimuth what OS are you on? Windows?
aengelke commentedon Aug 11, 2014
@pvrs12 This actually happens on windows for me. Probably only PDE files in the sketch folder should be watched? (I noticed that saving images triggered this, too.)
GKFX commentedon Aug 12, 2014
@aengelke And
.java?GKFX commentedon Aug 12, 2014
Also, the message should be change to indicate that less is being watched. "Your code has been ...".
aengelke commentedon Aug 12, 2014
@GKFX actually, all files that the current mode can open.
GKFX commentedon Aug 12, 2014
Oh, of course. (I tend to stick to Java Mode myself.)
pvrs12 commentedon Aug 13, 2014
I came up with a possible fix for this. It now attempts to detect if the change was in the sketch or not before displaying any dialog. If it was in the sketch then it prompts for a reload. The other case in which it will prompt for a reload (which could cause false positives) is if the file was edited with gedit under linux (this is because of how gedit writes to the files and how the file detection is written in java)
benfry commentedon Aug 14, 2015
The base issue here has been fixed. Anyone having problems with this, please file a new issue with details of what's going on.
github-actions commentedon Jun 16, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.