Keep getting [Confirm] "Reload File? File was modified from outside...."

scottcopus's profile image scottcopus posted 11 years ago in General Permalink
Sometimes when I open up a previously-saved SQL file, maybe edit it, and run it, I will get the popup:

[Confirm]
Reload File?
File was modified from outside...

I have not figured out the steps to reliably reproduce it as it appears to be random.

Has anyone else experienced this?

Using version 8.3.0.4694 (x64)

thanks,
Scott
scottcopus's profile image scottcopus posted 11 years ago Permalink
Follow-up: I don't know if this makes a difference or not, but my SQL query files are on a mapped network drive.
ansgar's profile image ansgar posted 11 years ago Permalink
Yes, I guess the network drives are problematic for the watching-for-modifications code. It's a separate unit which does that: "Cromis Directory Watch" from http://www.cromis.net/blog/downloads/directory-watch/ . I guess I have to dive into that to get that fixed.
Sandi's profile image Sandi posted 5 years ago Permalink

Hi, I am a new member of this forum, but old user of Ansgar, from mysqlFront to heidiSql :)

On HeidiSql, I keep getting "confirm reload file?" too, from HeidiSql v9 until now v10.2.0.5599, for several years

My sql query file store on local drive, xxx.sql (text file)

The same file when I open, at random times it keep asking "[confirm] reload file?" But when I checked on windows explorer (window xp / windows 7 / windows 10), the xxx.sql file was not modified, last modified is 2017, now is 2019

Can you explain, "reload file" dialog box appear on what condition? Changed of file "created time", or "modified time" or other?

Thanks

ansgar's profile image ansgar posted 5 years ago Permalink

That "reload file" prompt is triggered by a waModified message through an instance of Cromis.DirectoryWatch from http://www.cromis.net/blog/downloads/directory-watch/

If it's a local drive file, it should indeed have no such problems.

Sandi's profile image Sandi posted 5 years ago Permalink

Finally I found out what happened

The cromis link which Ansgar post above already dead, I use wayback machine, and get a 2017 snapshot: (I can not post link on here because new member)

I used the demo project included in the .zip, and found out, waModified also trigerred by the change of "accessed time" of a file

Windows automatically change accessed time of a file, by its own Windows rule: -when we right click > properties on a file -when we open a file -etc (the change of accessed time not always happen when i tried, maybe every few minutes, i don't know the Windows rules)

The point on HeidiSql is: "Reload file" prompt should not appear when "accesed time" of a file changed, because nothing was modified

The solution maybe: -change behaviour of the cromis directory watcher (i don't know how) :D -change HeidiSql on how to detect a file changes (by its size, time modified, etc)

Wish what I found out is true and Ansgar can fix it. Hehehe. Thanks :)

Sandi's profile image Sandi posted 5 years ago Permalink

(Sorry repost, I need to enter 2 times to make a new line)

Finally I found out what happened

The cromis link which Ansgar post above already dead, I use wayback machine, and get a 2017 snapshot: (I can not post link on here because new member)

I used the demo project included in the .zip, and found out, waModified also trigerred by the change of "accessed time" of a file

Windows automatically change accessed time of a file, by its own Windows rule:

-when we right click > properties on a file

-when we open a file

-etc

(the change of accessed time not always happen when i tried, maybe every few minutes, i don't know the Windows rules)

The point on HeidiSql is: "Reload file" prompt should not appear when "accesed time" of a file changed, because nothing was modified

The solution maybe:

-change behaviour of the cromis directory watcher (i don't know how) :D

-change HeidiSql on how to detect a file changes (by its size, time modified, etc)

Wish what I found out is true and Ansgar can fix it. Hehehe. Thanks :)

Code modification/commit 9121633 from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.2.0.5763
Do not trigger file reload prompt after file access. See https://www.heidisql.com/forum.php?t=15500
ansgar's profile image ansgar posted 5 years ago Permalink

Wow, that deep dive into the code must have been some work.

I just pushed a change which removes the woLastAccess option from the TDirectoryWatch instance. I hope this helps. Please just update to the latest build.

Sandi's profile image Sandi posted 5 years ago Permalink

Confirm, problem has been fixed, on v10.2.0.5763.

Thanks :)

raabenF's profile image raabenF posted 3 years ago Permalink

Confirm, but, i use onedrive recently, that always triggers it anyway, just tested

Magrini's profile image Magrini posted 8 months ago Permalink

The same happened to me today (2024-04-12) with portable version 12.6.0.6823

1 attachment(s):
  • Prb
ansgar's profile image ansgar posted 8 months ago Permalink

@Magrini apparently OneDrive is triggering that reload prompt due to some file access. Try loading/storing tabs to a local folder on your harddrive without cloud synchronization.

Please login to leave a reply, or register at first.