~ubuntu-branches/debian/sid/neovim/sid

« back to all changes in this revision

Viewing changes to src/nvim/os/stdpaths.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2016-04-18 21:42:19 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20160418214219-1e6d4o1fwqarzk46
Tags: 0.1.3-1
* New upstream release.  (Closes: #820562)
* debian/control:
  + Remove unnecessary luarocks Build-Depends
  + Add libkvm-dev Build-Depends for kfreebsd-*
  + Add python(3)-neovim to Recommends.  (Closes: #812737)
  + Declare compiance with policy 3.9.8, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
static const char *const xdg_defaults[] = {
23
23
#ifdef WIN32
24
24
  // Windows
25
 
  [kXDGConfigHome] = "$LOCALAPPDATA\\nvim\\config",
26
 
  [kXDGDataHome]   = "$LOCALAPPDATA\\nvim\\data",
27
 
  [kXDGCacheHome]  = "$LOCALAPPDATA\\nvim\\cache",
 
25
  [kXDGConfigHome] = "$LOCALAPPDATA",
 
26
  [kXDGDataHome]   = "$LOCALAPPDATA",
 
27
  [kXDGCacheHome]  = "$TEMP",
28
28
  [kXDGRuntimeDir] = NULL,
29
29
  [kXDGConfigDirs] = NULL,
30
30
  [kXDGDataDirs] = NULL,
66
66
/// @param[in]  idx  XDG directory to use.
67
67
///
68
68
/// @return [allocated] `{xdg_directory}/nvim`
 
69
///
 
70
/// In WIN32 get_xdg_home(kXDGDataHome) returns `{xdg_directory}/nvim-data` to
 
71
/// avoid storing configuration and data files in the same path.
69
72
static char *get_xdg_home(const XDGVarType idx)
70
73
  FUNC_ATTR_WARN_UNUSED_RESULT
71
74
{
72
75
  char *dir = stdpaths_get_xdg_var(idx);
73
76
  if (dir) {
 
77
#if defined(WIN32)
 
78
    dir = concat_fnames_realloc(dir,
 
79
                                (idx == kXDGDataHome ? "nvim-data" : "nvim"),
 
80
                                true);
 
81
#else
74
82
    dir = concat_fnames_realloc(dir, "nvim", true);
 
83
#endif
75
84
  }
76
85
  return dir;
77
86
}