From e8703e3484ab64a34ad4c8d673cd6c72f6a749ee Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Tue, 21 Feb 2023 17:19:45 +0100 Subject: [PATCH] :wrench: Prevent warning --- src/ProfileManager.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ProfileManager.js b/src/ProfileManager.js index 12bccbd..fcad182 100644 --- a/src/ProfileManager.js +++ b/src/ProfileManager.js @@ -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)};