Project

General

Profile

Bug #6279 ยป 0010-portability-fix.patch

Restores portable code - John Hunt, 2023-06-23 19:04

View differences:

src/dvr/dvr_config.c
280 280
  char recordings_dir[] = "/var/lib/tvheadend/recordings";
281 281
  char home_dir[PATH_MAX + sizeof("/Videos")];
282 282
  char dvr_dir[PATH_MAX];
283
  char buf[PATH_MAX];
283 284
  uid_t uid = getuid();
284 285
  char *xdg_dir;
285 286
  struct stat st;
......
313 314
  else if(stat(home_dir, &st) == 0 && S_ISDIR(st.st_mode))
314 315
      cfg->dvr_storage = strndup(home_dir, sizeof(home_dir));
315 316
  else
316
      cfg->dvr_storage = get_current_dir_name();
317
      cfg->dvr_storage = strdup(getcwd(buf, sizeof(buf)));
317 318

  
318 319
  tvhwarn(LS_DVR,
319 320
          "Output directory for video recording is not yet configured "
    (1-1/1)