@@ -122,6 +122,8 @@ pub enum BaseDirectory {
122122 /// Resolves to [`BaseDirectory::Home`]`/Library/Logs/{bundle_identifier}` on macOS
123123 /// and [`BaseDirectory::Config`]`/{bundle_identifier}/logs` on linux and Windows.
124124 AppLog ,
125+ /// The Home directory.
126+ Home ,
125127
126128 /// The Desktop directory.
127129 #[ cfg( not( target_os = "android" ) ) ]
@@ -132,9 +134,6 @@ pub enum BaseDirectory {
132134 /// The Font directory.
133135 #[ cfg( not( target_os = "android" ) ) ]
134136 Font ,
135- /// The Home directory.
136- #[ cfg( not( target_os = "android" ) ) ]
137- Home ,
138137 /// The Runtime directory.
139138 #[ cfg( not( target_os = "android" ) ) ]
140139 Runtime ,
@@ -164,6 +163,7 @@ impl BaseDirectory {
164163 Self :: AppLocalData => "$APPLOCALDATA" ,
165164 Self :: AppCache => "$APPCACHE" ,
166165 Self :: AppLog => "$APPLOG" ,
166+ Self :: Home => "$HOME" ,
167167
168168 #[ cfg( not( target_os = "android" ) ) ]
169169 Self :: Desktop => "$DESKTOP" ,
@@ -172,8 +172,6 @@ impl BaseDirectory {
172172 #[ cfg( not( target_os = "android" ) ) ]
173173 Self :: Font => "$FONT" ,
174174 #[ cfg( not( target_os = "android" ) ) ]
175- Self :: Home => "$HOME" ,
176- #[ cfg( not( target_os = "android" ) ) ]
177175 Self :: Runtime => "$RUNTIME" ,
178176 #[ cfg( not( target_os = "android" ) ) ]
179177 Self :: Template => "$TEMPLATE" ,
@@ -201,6 +199,7 @@ impl BaseDirectory {
201199 "$APPLOCALDATA" => Self :: AppLocalData ,
202200 "$APPCACHE" => Self :: AppCache ,
203201 "$APPLOG" => Self :: AppLog ,
202+ "$HOME" => Self :: Home ,
204203
205204 #[ cfg( not( target_os = "android" ) ) ]
206205 "$DESKTOP" => Self :: Desktop ,
@@ -209,8 +208,6 @@ impl BaseDirectory {
209208 #[ cfg( not( target_os = "android" ) ) ]
210209 "$FONT" => Self :: Font ,
211210 #[ cfg( not( target_os = "android" ) ) ]
212- "$HOME" => Self :: Home ,
213- #[ cfg( not( target_os = "android" ) ) ]
214211 "$RUNTIME" => Self :: Runtime ,
215212 #[ cfg( not( target_os = "android" ) ) ]
216213 "$TEMPLATE" => Self :: Template ,
@@ -302,15 +299,14 @@ fn resolve_path<R: Runtime>(
302299 BaseDirectory :: AppLocalData => resolver. app_local_data_dir ( ) ,
303300 BaseDirectory :: AppCache => resolver. app_cache_dir ( ) ,
304301 BaseDirectory :: AppLog => resolver. app_log_dir ( ) ,
302+ BaseDirectory :: Home => resolver. home_dir ( ) ,
305303 #[ cfg( not( target_os = "android" ) ) ]
306304 BaseDirectory :: Desktop => resolver. desktop_dir ( ) ,
307305 #[ cfg( not( target_os = "android" ) ) ]
308306 BaseDirectory :: Executable => resolver. executable_dir ( ) ,
309307 #[ cfg( not( target_os = "android" ) ) ]
310308 BaseDirectory :: Font => resolver. font_dir ( ) ,
311309 #[ cfg( not( target_os = "android" ) ) ]
312- BaseDirectory :: Home => resolver. home_dir ( ) ,
313- #[ cfg( not( target_os = "android" ) ) ]
314310 BaseDirectory :: Runtime => resolver. runtime_dir ( ) ,
315311 #[ cfg( not( target_os = "android" ) ) ]
316312 BaseDirectory :: Template => resolver. template_dir ( ) ,
0 commit comments