mirror of
				https://github.com/vlang/v.git
				synced 2023-08-10 21:13:21 +03:00 
			
		
		
		
	os: allow using XDG_CACHE_HOME for choosing the folder returned by os.cache_dir() on windows too
				
					
				
			This commit is contained in:
		| @@ -615,11 +615,9 @@ pub fn cache_dir() string { | |||||||
| 	// $XDG_CACHE_HOME defines the base directory relative to which user specific | 	// $XDG_CACHE_HOME defines the base directory relative to which user specific | ||||||
| 	// non-essential data files should be stored. If $XDG_CACHE_HOME is either not set | 	// non-essential data files should be stored. If $XDG_CACHE_HOME is either not set | ||||||
| 	// or empty, a default equal to $HOME/.cache should be used. | 	// or empty, a default equal to $HOME/.cache should be used. | ||||||
| 	$if !windows { | 	xdg_cache_home := getenv('XDG_CACHE_HOME') | ||||||
| 		xdg_cache_home := getenv('XDG_CACHE_HOME') | 	if xdg_cache_home != '' { | ||||||
| 		if xdg_cache_home != '' { | 		return xdg_cache_home | ||||||
| 			return xdg_cache_home |  | ||||||
| 		} |  | ||||||
| 	} | 	} | ||||||
| 	cdir := join_path_single(home_dir(), '.cache') | 	cdir := join_path_single(home_dir(), '.cache') | ||||||
| 	if !is_dir(cdir) && !is_link(cdir) { | 	if !is_dir(cdir) && !is_link(cdir) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Delyan Angelov
					Delyan Angelov