seafile/seafile-5.0.5-instance_dir.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

--- seafile-5.0.5/controller/seafile-controller.c.orig 2016-04-08 18:41:39.000000000 +0200
+++ seafile-5.0.5/controller/seafile-controller.c 2016-04-17 14:06:00.685984507 +0200
@@ -320,7 +320,8 @@
g_setenv ("SEAFILE_CENTRAL_CONF_DIR", ctl->central_config_dir, TRUE);
char *seahub_dir = g_build_filename (installpath, "seahub", NULL);
- char *seafdav_conf = g_build_filename (topdir, "conf", "seafdav.conf", NULL);
+ char *seafdav_conf = g_build_filename (ctl->central_config_dir, "seafdav.conf", NULL);
+
g_setenv ("SEAHUB_DIR", seahub_dir, TRUE);
g_setenv ("SEAFDAV_CONF", seafdav_conf, TRUE);
@@ -575,7 +576,7 @@
static void
init_pidfile_path (SeafileController *ctl)
{
- char *pid_dir = g_build_filename (topdir, "pids", NULL);
+ char *pid_dir = g_build_filename (ctl->seafile_dir, "pids", NULL);
if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) {
if (g_mkdir(pid_dir, 0777) < 0) {
seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno));
@@ -788,7 +789,7 @@
GKeyFile *key_file = NULL;
GError *error = NULL;
- seafdav_conf = g_build_filename(topdir, "conf", "seafdav.conf", NULL);
+ seafdav_conf = g_build_filename (ctl->central_config_dir, "seafdav.conf", NULL);
if (!g_file_test(seafdav_conf, G_FILE_TEST_EXISTS)) {
goto out;
}