thunderbird-profile文件在virtualbox共享目录,丢失配置

现象

  1. profile文件在virtualbox共享目录,丢失配置

  2. 这个问题只有虚拟机的host系统是Windows的时候发生,linux和mac都正常。

  3. 这个问题 Thunderbird 60 开始出现

  4. Tools > Developer Tools > Error Conosle 显示类似如下报错信息:

    1
    2
    3
     "Win error 32 during operation rename on file F:\Thunderbird\default\extensions.json". The process cannot access the file because it is already used by another process. 
     resource://gre/modules/DeferredTask.jsm:313:7
     self-hosted:1229:9
    

分析

It seems that Thunderbird saves the settings the following way:

  1. save the latest settings in .tmp files
  2. delete the original files
  3. rename the .tmp files to the original files

And it seems that the last step does not work. Maybe because the network drive still performes step 2 at this moment?
Maybe there is some retry and/or some waiting time necessary between step 2 and step 3 ?

work around

The settings are preserved if I manually rename the files before starting Thunderbird:

1
2
3
4
5
ren extensions.json.tmp extensions.json
ren session.json.tmp session.json
ren sessionCheckpoints.json.tmp sessionCheckpoints.json
ren xulstore.json.tmp xulstore.json
ren addons.json.tmp addons.json