Skip to content

Commit

Permalink
Fix Issue with Replacing Config File Symlinks
Browse files Browse the repository at this point in the history
Replace writing the configu fileo through GLib and use an output file stream
which will automatically reference the symlink. This is the same behavior used
when writing the background file.

fixes #113
  • Loading branch information
mca-gif committed Feb 28, 2018
1 parent 592c9cc commit 79158b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ bool Config::save_cfg()

kf.set_string_list("nitrogen", "dirs", m_vec_dirs);

if (g_file_set_contents(cfgfile.c_str(), kf.to_data().c_str(), -1, NULL) == FALSE)
return false;
Glib::ustring outp = kf.to_data();
std::ofstream outf(cfgfile.c_str());
outf << outp;
outf.close();

return true;
}
Expand Down

0 comments on commit 79158b4

Please sign in to comment.