-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Closed
Copy link
Labels
*questionIssue represents a question, should be posted to StackOverflow (VS Code)Issue represents a question, should be posted to StackOverflow (VS Code)
Description
.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.
//*/
// ...
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
*questionIssue represents a question, should be posted to StackOverflow (VS Code)Issue represents a question, should be posted to StackOverflow (VS Code)