Check actual socket path length rather than InSnap/InFlatpak
This commit is contained in:
		
							parent
							
								
									143b9682a4
								
							
						
					
					
						commit
						f58874572d
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -799,10 +799,15 @@ QString AppRuntimeDirectory() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QString SingleInstanceLocalServerName(const QString &hash) { | QString SingleInstanceLocalServerName(const QString &hash) { | ||||||
| 	if (InFlatpak() || InSnap()) { | 	const auto idealSocketPath = AppRuntimeDirectory() | ||||||
|  | 		+ hash | ||||||
|  | 		+ '-' | ||||||
|  | 		+ cGUIDStr(); | ||||||
|  | 
 | ||||||
|  | 	if (idealSocketPath.size() > 108) { | ||||||
| 		return AppRuntimeDirectory() + hash; | 		return AppRuntimeDirectory() + hash; | ||||||
| 	} else { | 	} else { | ||||||
| 		return AppRuntimeDirectory() + hash + '-' + cGUIDStr(); | 		return idealSocketPath; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ilya Fedin
						Ilya Fedin