* {@link #@link com.mucommander.ui.main.FolderPanel.FolderPanelType.RIGHT}).
* @return the user's initial path for the specified frame.
*/
protected FileURL getInitialPath(FolderPanelType folderPanelType) {
// Preferences configuration
MuPreferencesAPI preferences = MuConfigurations.getPreferences();
// Checks which kind of initial path we're dealing with.
boolean isCustom = preferences.getVariable(MuPreference.STARTUP_FOLDERS, MuPreferences.DEFAULT_STARTUP_FOLDERS).equals(MuPreferences.STARTUP_FOLDERS_CUSTOM);
String customPath = null;
// Handles custom initial paths.
if (isCustom) {
customPath = (folderPanelType == FolderPanelType.LEFT ?
preferences.getVariable(MuPreference.LEFT_CUSTOM_FOLDER)
: preferences.getVariable(MuPreference.RIGHT_CUSTOM_FOLDER));
}
AbstractFile result = null;
if (customPath == null || (result = FileFactory.getFile(customPath)) == null || !result.exists())
result = getHomeFolder();