Refreshing Folder often doesn't work, why?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Giplo
New Member
New Member
Posts: 1
Joined: 2011-09-25, 11:31 UTC

Refreshing Folder often doesn't work, why?

Post by *Giplo »

My java application write a LOG file on Windows 7 64bit PC.
All works fine, and data are flushed immediately,
but I cannot see the new file size, even if I reread source (CTR + R).

If I edit the file, I can see new data and after closing the editor, TC shows the udpated file size.
If I open the folder with explorer and refresh (F5) also TC is refreshed ...

I've tried with 7.56a and with 8.0 b2 - 64.

Is there another command for refreshing folders ??

Thanks in advance
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have seen this too sometimes - TC does get the wrong size from the system. I guess that the data isn't flushed to disk immediately. Some function in Explorer must be forcing the flush.
Author of Total Commander
https://www.ghisler.com
kodybrown
Junior Member
Junior Member
Posts: 2
Joined: 2008-10-15, 17:38 UTC
Location: Salt Lake City, UT
Contact:

Post by *kodybrown »

I see a similar thing, although while developing in C#. If I don't explicitly call the .Flush() method of my stream or file writer, TC (nor Windows Explorer) does not see the changes. Occasionally, I haven't seen the changes until the writer object was closed and/or set to null (causing the garbage collector to free up resources).

It's been a long time since I've developed for the desktop with Java, but I hope this is helpful!
johnjt
Junior Member
Junior Member
Posts: 2
Joined: 2015-12-02, 12:55 UTC

Post by *johnjt »

Will this get sometimes soon a fix?

I have a very simmilar problem when i use plugin to define different colour if there is a comment on a file.

when user A on PC A taggs a file with a comment i cannot see the file colour changing on user B with PC b site unless i 1. Change directory, 2. edit the file, 3. Colse TM and restart it or edit the comment.

This is realy annoying
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I don't see any way to fix this problem - Total Commander does not get a notification that something has changed. :(
Author of Total Commander
https://www.ghisler.com
johnjt
Junior Member
Junior Member
Posts: 2
Joined: 2015-12-02, 12:55 UTC

Post by *johnjt »

yeh but what is the difference between changeing folder and pressing the refreh button?

Refreh button does not show me the changes but if i change folder and then back again i can see the changes.

I would expect that the refresh button does the same as changing a folder.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Refresh re-reads the entire directory, but only reloads icons when anything has changed in the directory listing, e.g. file sizes, timestamps, names, attributes.
Author of Total Commander
https://www.ghisler.com
Ash Thoref
New Member
New Member
Posts: 1
Joined: 2016-04-30, 20:33 UTC

Post by *Ash Thoref »

Hi, I found something interesting. When I download a file, its size in TC doesn't refresh. CTRL+R doesn't help. But when I press F3 (open that file in Lister) and press ALT+TAB (or ESC to close Lister) to return to TC - its size "magically" updates. Maybe that will be some clue to solve that issue?
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Known problem since windows Vista/7.
The OS does no notify applications in every case about filesystem changes.
MSDN: FindFirstChangeNotification wrote:FILE_NOTIFY_CHANGE_SIZE
0x00000008

Any file-size change in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change in file size only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
Only way around is manual refresh with <Ctrl+R> (with Configuration->Options.. Icons [x] Show overlay Icons enabled).
The read operation triggered by the refresh of the overlay icons seems to flush the ntfs cache.

Regards
Holger
Post Reply