🔧 Prevent warning

This commit is contained in:
Simon Schneegans
2023-02-21 17:19:45 +01:00
parent fae67f89b5
commit e8703e3484
+5 -2
View File
@@ -65,8 +65,11 @@ var ProfileManager = class {
GLib.get_real_time()}.conf`;
const file = Gio.File.new_for_path(path);
file.create(Gio.FileCreateFlags.NONE, null);
file.replace_contents(content, null, false, Gio.FileCreateFlags.REPLACE_DESTINATION,
null);
if (content != '') {
file.replace_contents(content, null, false, Gio.FileCreateFlags.REPLACE_DESTINATION,
null);
}
const profile = {'path': path, 'settings': this._getProfileSettings(path)};