You are here: PSPad forum > Bug report / Hlášení chyb > File not update

File not update

Goto Page: 1 2 Next

#1 File not update

Posted by: Macari | Date: 2014-08-13 08:17 | IP: IP Logged

Hello,

I use now PsPad: 4.5.8 (2485) on Windows 8 (german) and found out, thats now file is not updated each time after rewrite with pspad self or a extern tool. I think this is new, I never see this problem before.

Example:

* open file.txt
* open file.txt in another tool (like notepad.exe)
* in another tool edit file.txt
* click in pspad and see a notification that file have update (works!)
* change again in another tool the file.txt
* click again in pspad and see... nothing. file.txt is not updated

* change again in another tool the file.txt
* click again in pspad and see... nothing. file.txt is not updated

* change again in another tool the file.txt
* click again in pspad and see a notification that file have update (works!)

I can't say why, but its works and its not work. I can't figure out why. I don't need a extern tool. With multifile-replace in pspad is the same problem.

Greetings

Options: Reply | Quote | Up ^


#2 Re: File not update

Posted by: pspad | Date: 2014-08-13 09:58 | IP: IP Logged

Hello
The problem comes with Windows 7, where MS changed strategy. If you edit files from server or network drive, you don't get correct information right after you save file (new time stamp), but your operating system keeps cached information some time. I was forced to add some delay (seconds) what doesn't mean change.
Another problem started with Windows 7 and non MS networks (typically Samba). There timestamp stored to server and read back from server are little different on the last number digits. It causes unwanted changes information.

I will try to make shorter delay between change. You can test it - open file as you did before, but don't make your test so quickly one after one. Wait a moment before you will make a change in notepad.

Options: Reply | Quote | Up ^


#3 Re: File not update

Posted by: pspad | Date: 2014-08-13 10:24 | IP: IP Logged

I will improve detection mechanism - I will add file size as another attribute. From now, PSPad will detect modification FileTime and FileSize as change.

Options: Reply | Quote | Up ^


#4 Re: File not update

Posted by: Macari | Date: 2014-08-13 11:10 | IP: IP Logged

I don't know what language you use, but its there nothing like this?

msdn.microsoft.com

or

stackoverflow.com

(only google results ^^)

Options: Reply | Quote | Up ^


#5 Re: File not update

Posted by: pspad | Date: 2014-08-13 12:01 | IP: IP Logged

All Windows API are based on FindFirstChangeNotification, what is directory based.
If you open 30 files from different folders, it means you need to receive events from 30 folders. Change of any file in folder will create notification event, event for you is interesting one file from large folder.
In case it's a folder with large number of files modified often by system you will is it pitty. On the slow network drives it will cause problems too.

So I decided to check file change only in case PSPad window activation.

Options: Reply | Quote | Up ^


#6 Re: File not update

Posted by: Macari | Date: 2014-08-13 17:20 | IP: IP Logged

Only a other example:

* open pspad with one(or more) file(s).
* go to find/replace in files and replace a word in this open(focused) file and optional in other too.
* the actual open(focused) file in pspad have still the old content.
* I must close and open it again to see the changes.

You should check/update all open files in pspad immediately after find/replace in files. smiling smiley

Edited 1 time(s). Last edit at 2014-08-13 17:21 by Macari.

Options: Reply | Quote | Up ^


#7 Re: File not update

Posted by: Macari | Date: 2014-09-18 15:00 | IP: IP Logged

Macari:
Only a other example:

* open pspad with one(or more) file(s).
* go to find/replace in files and replace a word in this open(focused) file and optional in other too.
* the actual open(focused) file in pspad have still the old content.
* I must close and open it again to see the changes.

You should check/update all open files in pspad immediately after find/replace in files. smiling smiley

Only a notice: this happen still in 4.5.8(2500).

Options: Reply | Quote | Up ^


#8 Re: File not update

Posted by: pspad | Date: 2014-10-05 17:27 | IP: IP Logged

After file search/replace PSPad calls check for all open files.
I tested it and in case any open file was changed, PSPad correctly reload content automatically.

Options: Reply | Quote | Up ^


#9 Re: File not update

Posted by: Macari | Date: 2014-11-14 20:35 | IP: IP Logged

I have now build 2517 and found again its not update all times the actual focused file after "search&replace in files". Thats a major bug, because I working more with this file and save a mixed version. File is now "damaged".

After I close this file and open again, the file is changed. So its really a bug in update/refresh after a "search&replace in files". That happen not everytime, but its happen. ^^

Options: Reply | Quote | Up ^


#10 Re: File not update

Posted by: pspad | Date: 2014-11-14 21:52 | IP: IP Logged

I tested it before some time, but I wasn't able to get situation when open file isn't updated with search/replace.
I need situation for simulation. If you are able to give me the example with non updated open file, I will be able to fix it.

Options: Reply | Quote | Up ^


Goto Page: 1 2 Next





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR