Biali
Biali

Reputation: 163

Why when saving(ctrl+s) a small python file in VSCode, the save takes a second and temporarily creates a copy of it?

When I press ctrl+s to save changes for a python file, the save takes one second. Moreover, in that one second a temporarily copy file is being created, but then deleted. How to fix this thing?

My two files before saving(ctrl+s):

My two files

My two files when I click save(ctrl+s):

enter image description here

Upvotes: 0

Views: 473

Answers (1)

MingJie-MSFT
MingJie-MSFT

Reputation: 9307

This is a temporary saved file. It records the content of the python file you are saving. It is used to ensure that the content of the python file can be recovered when the computer or vscode is shut down abnormally (such as power failure or manual shutdown). If this file has been saved successfully, this file will disappear, but if it failed, this file will not disappear. It will prompt you whether to restore your python file, and the restored content is extracted from this file.

Hope to answer your questions:)

Upvotes: 1

Related Questions