Переглянути джерело

* Port [3746] to 1.2.15
* Fix datadir being expanded to full path (fixes #405)



svn: 3747

Bryan Drewery 18 роки тому
батько
коміт
9c09555768
2 змінених файлів з 3 додано та 0 видалено
  1. 1 0
      doc/UPDATES
  2. 2 0
      src/conf.c

+ 1 - 0
doc/UPDATES

@@ -29,6 +29,7 @@
 * Change default ip/host/ip6 to a * in the binary config
 * Hide datadir if it is set to the default in the binary config
 * Silently fix user mistake of giving hostname in ip field in binary config
+* Fix datadir being expanded to full path (fixes #405)
 
 1.2.14 - http://wraith.botpack.net/milestone/1.2.14
 * Fix another bug in shell functions. (fixes #321)

+ 2 - 0
src/conf.c

@@ -1141,6 +1141,8 @@ bin_to_conf(bool error)
   if (!mkdir_p(conf.datadir) && error)
     werr(ERR_DATADIR);
 
+  str_redup(&conf.datadir, replace(datadir, conf.binpath, "."));
+
   Tempfile::FindDir();
 
   if (clear_tmpdir)