Fixed sharing mode when opening file.