This commit is contained in:
Morten M. Neergaard 2024-02-19 07:17:15 -07:00 committed by GitHub
commit cb4d10fc53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View file

@ -38,7 +38,7 @@ func save():
if text.length() > 0 and text.substr(text.length()-1, 1) != "\n":
text += "\n"
_client_connection.put_string(text)
_client_connection.put_string("s" + text)
emit_signal("saved")
close()

View file

@ -28,10 +28,12 @@ my $new_content = "";
$socket->recv($new_content, $length);
# Write content back into the file.
my $handle;
open ($handle,'>',$absolute_path) or die("Error opening file");
print $handle $new_content;
close ($handle) or die ("Error closing file");
if ($new_content =~ /^s/) {
my $handle;
open ($handle,'>',$absolute_path) or die("Error opening file");
print $handle (substr $new_content, 1);
close ($handle) or die ("Error closing file");
}
# This call is intended to block, we're waiting for Godot to close the connection.
my $reply;