fixed broken code related to base path
This commit is contained in:
		
							parent
							
								
									b92981ff95
								
							
						
					
					
						commit
						244339645d
					
				@ -88,6 +88,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  //implementation in path_functions.cpp
 | 
					  //implementation in path_functions.cpp
 | 
				
			||||||
  QString get_base_path();
 | 
					  QString get_base_path();
 | 
				
			||||||
 | 
					  QString get_data_path();
 | 
				
			||||||
  QString get_theme_path();
 | 
					  QString get_theme_path();
 | 
				
			||||||
  QString get_default_theme_path();
 | 
					  QString get_default_theme_path();
 | 
				
			||||||
  QString get_character_path(QString p_character);
 | 
					  QString get_character_path(QString p_character);
 | 
				
			||||||
 | 
				
			|||||||
@ -18,19 +18,15 @@ QString AOApplication::get_base_path()
 | 
				
			|||||||
#elif defined(ANDROID)
 | 
					#elif defined(ANDROID)
 | 
				
			||||||
  return "/storage/extSdCard/AO2/";
 | 
					  return "/storage/extSdCard/AO2/";
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  QString default_path = "/base/";
 | 
					  return QDir::currentPath() + "/base/";
 | 
				
			||||||
  QString alt_path = "/data/";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (dir_exists(default_path))
 | 
					 | 
				
			||||||
    return QDir::currentPath() + default_path;
 | 
					 | 
				
			||||||
  else if (dir_exists(alt_path))
 | 
					 | 
				
			||||||
    return QDir::currentPath() + alt_path;
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
      return QDir::currentPath() + default_path;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QString AOApplication::get_data_path()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  return get_base_path() + "data/";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString AOApplication::get_theme_path()
 | 
					QString AOApplication::get_theme_path()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  return get_base_path() + "themes/" + user_theme.toLower() + "/";
 | 
					  return get_base_path() + "themes/" + user_theme.toLower() + "/";
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user