mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:44:18 +00:00 
			
		
		
		
	Fix check of home directory (&& not ||), from Markus F X J Oberhumer,
GitHub issue 3297.
This commit is contained in:
		
							
								
								
									
										2
									
								
								spawn.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								spawn.c
									
									
									
									
									
								
							@@ -391,7 +391,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
 | 
			
		||||
	 */
 | 
			
		||||
	if (chdir(new_wp->cwd) == 0)
 | 
			
		||||
		environ_set(child, "PWD", 0, "%s", new_wp->cwd);
 | 
			
		||||
	else if ((tmp = find_home()) != NULL || chdir(tmp) == 0)
 | 
			
		||||
	else if ((tmp = find_home()) != NULL && chdir(tmp) == 0)
 | 
			
		||||
		environ_set(child, "PWD", 0, "%s", tmp);
 | 
			
		||||
	else if (chdir("/") == 0)
 | 
			
		||||
		environ_set(child, "PWD", 0, "/");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user