look at environment variables by hand if PyXDG isn't available. see #2149
This commit is contained in:
		
							parent
							
								
									00db7df873
								
							
						
					
					
						commit
						8d8c8a7f4e
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -103,9 +103,13 @@ class ConfigPaths: | ||||||
| 					self.data_root = os.path.join(xdg.BaseDirectory.\ | 					self.data_root = os.path.join(xdg.BaseDirectory.\ | ||||||
| 						xdg_data_dirs[0], u'gajim') | 						xdg_data_dirs[0], u'gajim') | ||||||
| 			else: | 			else: | ||||||
| 				self.config_root = os.path.expanduser(u'~/.config/gajim') | 				expand = os.path.expanduser | ||||||
| 				self.cache_root = os.path.expanduser(u'~/.cache/gajim') | 				base = os.getenv('XDG_CONFIG_HOME') or expand(u'~/.config') | ||||||
| 				self.data_root = os.path.expanduser(u'~/.local/share/gajim') | 				self.config_root = os.path.join(base, u'gajim') | ||||||
|  | 				base = os.getenv('XDG_CACHE_HOME') or expand(u'~/.cache') | ||||||
|  | 				self.cache_root = os.path.join(base, u'gajim') | ||||||
|  | 				base = os.getenv('XDG_DATA_HOME') or expand(u'~/.local/share') | ||||||
|  | 				self.data_root = os.path.join(base, u'gajim') | ||||||
| 
 | 
 | ||||||
| 	def add(self, name, type_, path): | 	def add(self, name, type_, path): | ||||||
| 		self.paths[name] = (type_, path) | 		self.paths[name] = (type_, path) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue