microsoft / microsoft/vscode-cpptools
Temporary Directories Cleanup in 'Single File Mode'
Open
@browntarik is already working on this.
Since Aug 29, 2023.
internal
Language Service
more votes needed
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Issue Details:
In the 'single file mode', the functions workspace_storage_path and database_storage_path are observed to return blank strings. As a result, the get_temp_path("") function is used. When get_temp_path receives a blank string, it generates a unique GUID every single time to form a part of the resultant path. This behavior implies:
- Each created directory has a unique GUID, meaning they are used once and never revisited.
- Any data written to these uniquely generated directories remains unused in subsequent sessions.
- There is no existing mechanism to clear or delete these directories after their one-time use.
Potential Solutions:
- Integrate a mechanism to clear these directories upon application shutdown. However, this might not be fully reliable as unplanned shutdowns or crashes may prevent the cleanup.
- Implement a persistent tracking system (possibly on the TypeScript side) that records these unique directories. This system can then be used to clean up these directories during a subsequent session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.