Files icon indicating copy to clipboard operation
Files copied to clipboard

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

Open BanCrash opened this issue 4 years ago • 12 comments

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

  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 avatar Aug 19 '21 21:08 BanCrash

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

gave92 avatar Aug 20 '21 07:08 gave92

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

BanCrash avatar Aug 20 '21 07:08 BanCrash

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)

gave92 avatar Aug 20 '21 08:08 gave92

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 avatar Aug 20 '21 08:08 BanCrash

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

BanCrash avatar Aug 24 '21 08:08 BanCrash

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.

Asmopdai avatar Aug 24 '21 16:08 Asmopdai

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 avatar Aug 30 '21 20:08 BanCrash

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

pairofcrocs avatar Feb 14 '22 20:02 pairofcrocs

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

rursache avatar Mar 29 '22 21:03 rursache

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.

eovermeer avatar Mar 30 '22 12:03 eovermeer

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?

hishitetsu avatar Jul 25 '23 03:07 hishitetsu

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

yaira2 avatar Jul 25 '23 03:07 yaira2