Skip to content

Commit

Permalink
nemo-view.c: Don't create a zero-length Empty Document.
Browse files Browse the repository at this point in the history
This avoids these files being given an x-zerosize mimetype,
preserving their traditional behavior.

Adding a newline is something an editor would do anyhow, once
the file is given actual content.

ref: linuxmint/mint22-beta#26
ref: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3053
ref: linuxmint/xed@3239b902a546
  • Loading branch information
mtwebster committed Jul 12, 2024
1 parent aeaa2bd commit 7c67dc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nemo-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -2124,8 +2124,8 @@ nemo_view_new_file (NemoView *directory_view,
nemo_view_new_file_with_initial_contents (directory_view,
parent_uri != NULL ? parent_uri : container_uri,
NULL,
NULL,
0,
"\n",
1,
NULL);
g_free (container_uri);
return;
Expand Down

0 comments on commit 7c67dc9

Please sign in to comment.