Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: SMB / MTP / some network folders won't refresh after changes #5869

Open
2 of 4 tasks
BanCrash opened this issue Aug 19, 2021 · 12 comments
Open
2 of 4 tasks

Bug: SMB / MTP / some network folders won't refresh after changes #5869

BanCrash opened this issue Aug 19, 2021 · 12 comments
Labels
area - file system area - network drives Features or bug reports relating to network drives

Comments

@BanCrash
Copy link
Contributor

BanCrash commented Aug 19, 2021

Description

When you make a change on a SMB, MTP or network folder, it won't get automatically refresh.

Progress:

  • SMB
  • MTP
  • Network folders
  • FTP

Steps To Reproduce

  1. Go to a SMB / MTP / network folder.
  2. Do something like pasting a file
  3. 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

debug.log
debug_fulltrust.log

(GIF is for SMB, but it happens the same on MTP)
GIF 19-08-2021 23-36-23

@BanCrash BanCrash added the bug label Aug 19, 2021
@gave92
Copy link
Member

gave92 commented Aug 20, 2021

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

@BanCrash
Copy link
Contributor Author

BanCrash commented Aug 20, 2021

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

@gave92
Copy link
Member

gave92 commented Aug 20, 2021

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)

@BanCrash
Copy link
Contributor Author

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.

@BanCrash
Copy link
Contributor Author

BanCrash commented Aug 24, 2021

@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 😕

@Asmopdai
Copy link

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.

@BanCrash
Copy link
Contributor Author

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.

@BanCrash BanCrash changed the title SMB / MTP won't refresh after changes SMB / MTP / some network folders won't refresh after changes Dec 1, 2021
@pairofcrocs
Copy link

I think a great "temporary" fix for this would be to have Files automatically refresh when an action (copy, move, paste) is completed.

@rursache
Copy link

rursache commented Mar 29, 2022

how is this still not fixed 1 year later? seems the most important thing to any file manager...

@eovermeer
Copy link

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.

This was referenced Mar 30, 2022
@Josh65-2201 Josh65-2201 moved this to 🆕 New in Files task board Sep 8, 2022
@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board Jul 21, 2023
@yaira2 yaira2 changed the title SMB / MTP / some network folders won't refresh after changes Bug: SMB / MTP / some network folders won't refresh after changes Jul 21, 2023
@hishitetsu
Copy link
Member

Currently the following code is not really applied to SMB.

// Watch for changes using Win32 in Box Drive folder (#7428) and network drives (#5869)
case 2:
PageTypeUpdated?.Invoke(this, new PageTypeUpdatedEventArgs() { IsTypeCloudDrive = false });
WatchForWin32FolderChanges(path);
break;

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?

@yaira2
Copy link
Member

yaira2 commented Jul 25, 2023

I think the selection/scroll position issue will be solved with #2856, so maybe we can hold off on this until #2856 is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - file system area - network drives Features or bug reports relating to network drives
Projects
Status: 🔖 Ready to build
Development

No branches or pull requests

9 participants