Bug: SMB / MTP / some network folders won't refresh after changes
Description
When you make a change on a SMB, MTP or network folder, it won't get automatically refresh.
Progress:
- [x] SMB
- [ ] MTP
- [x] Network folders
- [ ] FTP
Steps To Reproduce
- Go to a SMB / MTP / network folder.
- Do something like pasting a file
- Check that if you don't manually refresh it won't get updated.
Expected behavior
Should automatically refresh.
Files Version
1.9.25.0
Windows Version
Windows 10 21H1 10.0.19043.1165
Relevant Assets
(GIF is for SMB, but it happens the same on MTP)

Can you give it time and see if it refreshes? (And by time I mean 10 seconds) -> #4999 should have taken care of SBM at least
Can you give it time and see if it refreshes? (And by time I mean 10 seconds) -> #4999 should have taken care of SBM at least
I repeated the test waiting 1 minute on both cases but no luck, still not automatically refreshing
EDIT: I will use the debugger with your linked PR to check if the case is case -1: // Enumeration failed or the issue is somewhere else
It looks like autorefresh is working for windows shares but not for SMB/MTP. I'm afraid we'll need to do it manually (either triggering a refresh after each operation or applying the expected changes to the file list)
It looks like autorefresh is working for windows shares but not for SMB/MTP. I'm afraid we'll need to do it manually (either triggering a refresh after each operation or applying the expected changes to the file list)
This is getting odd. In release still not refreshing. But in the debugging (in release) of your PR that I'm reviewing it's refreshing at the moment (at least on SMB). I tried to uninstall and install again from the store, but still not refreshing in the release version.
Even pasting the file on the last release trigger the refresh on the debugging version but not on the version itself. This is so odd.
@gave92 if I debug (in debug or release mode, it doesn't have any impact on the matter) it will work perfectly. But if I create the package with my own certificate and then install it, it won't work 😕
Hi, I got the same problem on SMB. I confirm that @BanCrash does not have an isolated problem. Would be way better without hiting F5 after each operation.
When it's not working debugger shows this output after pasting a file on the SMB folder: Excepción producida en 0x00007FF8009D4ED9 (KernelBase.dll) en FilesFullTrust.exe: 0xE0434352 (parámetros: 0xFFFFFFFF80070490, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FFFABCC0000). Translated: Exception occurred in 0x00007FF8009D4ED9 (KernelBase.dll) in FilesFullTrust.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070490, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FFFABCC0000).
Maybe unrelated, but on the working version this exception is not appearing.
I think a great "temporary" fix for this would be to have Files automatically refresh when an action (copy, move, paste) is completed.
how is this still not fixed 1 year later? seems the most important thing to any file manager...
Tried Files v2.1.24.0 again since v1.9 but still no auto refresh for network drives, that's indeed one of the most important things for a File Manager. Unfortunately deleted the Files app and returned to File Explorer in Windows 11.
Currently the following code is not really applied to SMB. https://github.com/files-community/Files/blob/fefee9842ca21775c852f9972b3c4a62eb700ca7/src/Files.App/Data/Models/ItemViewModel.cs#L1396-L1400
If this code were applied to SMB, it would certainly refresh, but since it refreshes the entire folder, even the item selection and the scroll position will be reset. @yaira2 which is better?
I think the selection/scroll position issue will be solved with #2856, so maybe we can hold off on this until #2856 is complete.