FiltaQuilla icon indicating copy to clipboard operation
FiltaQuilla copied to clipboard

The UNC \\ path is lost

Open uhtann opened this issue 5 years ago • 11 comments

The UNC \\ path is lost after reload Thunderbird. For example t1 after reload t2

uhtann avatar Dec 10 '20 13:12 uhtann

which version of FiltaQuilla, which version of Thunderbird?

RealRaven2000 avatar Dec 10 '20 13:12 RealRaven2000

TB 78.5.1 64bit FiltaQuilla 3.0pre51

uhtann avatar Dec 11 '20 12:12 uhtann

TB 78.5.1 64bit FiltaQuilla 3.0pre51

great. I will pin the issue for high priority - shouldn't be too hard to fix.

RealRaven2000 avatar Dec 11 '20 15:12 RealRaven2000

I believe this happens when Thunderbird reads the filters from file: https://searchfox.org/comm-esr78/source/mailnews/search/src/nsMsgFilterList.cpp#696 Unfortunately I would need a working Visual Studio environment to debug this in C++, which is difficult to set up.

RealRaven2000 avatar Dec 29 '20 21:12 RealRaven2000

Good mornig to all,

this morning I've spent some time on the issue and probably I've solved.

on my PC, I've closed thunderbird

I modified the msgFilterRules.dat inserting three slashes (\) instead of two before the address 192.168.0.xyz ....; saved and closed

I've locked the msgFilterRules.dat for any users (SYSTEM, Administrator, Users) from any writing, leaving only in reading and execution.

I've restarted and closed Thunderbird several times and ALL WORKS!!!!!

The address in the filter is always \192.168.0.xyz ... (two slashes)

Thank you

Best regards

A. Borriero

ABorrieroItaly avatar Apr 24 '21 10:04 ABorrieroItaly

I modified the msgFilterRules.dat inserting three slashes () instead of two before the address 192.168.0.xyz ....; saved and closed

I've locked the msgFilterRules.dat for any users (SYSTEM, Administrator, Users) from any writing, leaving only in reading and execution.

I've restarted and closed Thunderbird several times and ALL WORKS!!!!!

what happens if you edit any other filter in the account and then save? I definitely fear Thunderbird will overwrite the three \\\ if you allow it to save filter rules - the problem is fundamental in the way Thunderbird stores them.

RealRaven2000 avatar Apr 24 '21 12:04 RealRaven2000

... yes, I'm quite sure tha TB will overwrite.

But - probably - no problem; we can:

  • unlock the file . dat,
  • modify the filter with other items in TB, as we wish
  • close TB
  • fix manually (TB closed) the three slashes
  • lock the .dat file
  • open TB

Could be a good solution up to you?

Bye

Andrea

ABorrieroItaly avatar Apr 24 '21 15:04 ABorrieroItaly

... and yes, I agree that it is not a radical and final solution: it is only a by-pass.

Bye

andrea

ABorrieroItaly avatar Apr 24 '21 15:04 ABorrieroItaly

I did try using // instead of \\ for a UNC path, and / instead of \ for directory separators, which sometimes works on Windows apps. On the plus side it remained in place after Thunderbird restarts, but unfortunately the path isn't resolved so the save/detach action doesn't occur.

AdamReece-WebBox avatar Oct 07 '22 10:10 AdamReece-WebBox

that may be a good workaround. I will look into the code whether I can replace that (on Windows) during the file operation. The main problem here is that when you select the path (with Windows Explorer) it will always end up being \\ . I do not have control on how thunderbird stores this value (this is all built in and hidden to the Add-ons / JavaScript layer)

RealRaven2000 avatar Oct 07 '22 10:10 RealRaven2000

The main problem here is that when you select the path (with Windows Explorer) it will always end up being \\. I do not have control on how thunderbird stores this value (this is all built in and hidden to the Add-ons / JavaScript layer)

I agree with this entirely, and think it would be acceptable to include a clear warning in the add-on documentation about this whole issue around UNC paths.

AdamReece-WebBox avatar Oct 07 '22 10:10 AdamReece-WebBox