Skip to content

files that are opened are getting ".git" appended to their file names internally #22561

@bobmagicii

Description

@bobmagicii

.git is being appended to the names of files internally, when their filenames are accessed via the extension api.

because vscode insists on throwing file open and file close events for tab switching i have to compare the file that was closed to the list of files code is still keeping open, after a delay, so code asyncly has time to actually attempt to close it.

because code is appending this weird ".git" to the end it is never finding the file.

for(Iter = 0; Iter < vscode.workspace.textDocuments.length; Iter++) {
	AutoFoldTracker.PrintDebug("file to check: " + File.uri.fsPath);
	AutoFoldTracker.PrintDebug("currently open: " + vscode.workspace.textDocuments[Iter].uri.fsPath);

	if(vscode.workspace.textDocuments[Iter].uri.fsPath == File.uri.fsPath)
	return;
}
[AF] file to check: c:\Users\bob\Desktop\atlantis\routes\Blog.php.git
[AF] currently open: c:\Users\bob\Desktop\atlantis\routes\BlogPost.php

[AF] file to check: c:\Users\bob\Desktop\atlantis\routes\Blog.php.git
[AF] currently open: c:\Users\bob\Desktop\atlantis\routes\Blog.php <<-- this one...

[AF] file to check: c:\Users\bob\Desktop\atlantis\routes\Blog.php.git
[AF] currently open: c:\Users\bob\Desktop\atlantis\core\Atlantis\Element\PagePromo.php

[AF] file to check: c:\Users\bob\Desktop\atlantis\routes\Blog.php.git
[AF] currently open: c:\Users\bob\Desktop\atlantis\core\Atlantis\Element\PagePromo.php.git

[AF] file closed: c:\Users\bob\Desktop\atlantis\routes\Blog.php.git

how File became to be:

	vscode.workspace.onDidCloseTextDocument(
		AutoFoldTracker.OnFileClose,
		null,
		context
	);
	OnFileClose:
	function(File) {
	/*//
	@argv TextDocument
	@return Void
	when a file is closed, forget about it.
	//*/

		// ...
		
	}

Metadata

Metadata

Assignees

Labels

*questionIssue represents a question, should be posted to StackOverflow (VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions