mirror of
https://github.com/godotengine/godot-csharp-vscode.git
synced 2025-12-31 21:48:32 +03:00
Support metadata file with Windows new lines
Replace Windows new lines (`\r\n`) with Unix new lines (`\n`) before splitting so we can handle the metadata file as if it was using `\n` all along.
This commit is contained in:
@@ -372,7 +372,7 @@ export class Client implements Disposable {
|
||||
readMetadataFile(): GodotIdeMetadata | undefined {
|
||||
const buffer = fs.readFileSync(this.metaFilePath);
|
||||
const metaFileContent = buffer.toString('utf-8');
|
||||
const lines = metaFileContent.split('\n');
|
||||
const lines = metaFileContent.replace('\r\n', '\n').split('\n');
|
||||
|
||||
if (lines.length < 2) {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user