Use the old config directory .config/textsecure as fallback
This commit is contained in:
		
							parent
							
								
									eabd361405
								
							
						
					
					
						commit
						95278a95ce
					
				@ -78,6 +78,10 @@ The password and cryptographic keys are created when registering and stored in t
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $HOME/.config/signal/data/
 | 
					        $HOME/.config/signal/data/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For legacy users, the old config directory is used as a fallback:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $HOME/.config/textsecure/data/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Building
 | 
					## Building
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This project uses [Gradle](http://gradle.org) for building and maintaining
 | 
					This project uses [Gradle](http://gradle.org) for building and maintaining
 | 
				
			||||||
 | 
				
			|||||||
@ -83,6 +83,12 @@ public class Main {
 | 
				
			|||||||
                String settingsPath = ns.getString("config");
 | 
					                String settingsPath = ns.getString("config");
 | 
				
			||||||
                if (TextUtils.isEmpty(settingsPath)) {
 | 
					                if (TextUtils.isEmpty(settingsPath)) {
 | 
				
			||||||
                    settingsPath = System.getProperty("user.home") + "/.config/signal";
 | 
					                    settingsPath = System.getProperty("user.home") + "/.config/signal";
 | 
				
			||||||
 | 
					                    if (!new File(settingsPath).exists()) {
 | 
				
			||||||
 | 
					                        String legacySettingsPath = System.getProperty("user.home") + "/.config/textsecure";
 | 
				
			||||||
 | 
					                        if (new File(legacySettingsPath).exists()) {
 | 
				
			||||||
 | 
					                            settingsPath = legacySettingsPath;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                m = new Manager(username, settingsPath);
 | 
					                m = new Manager(username, settingsPath);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user