mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'master' of github.com:tmux/tmux
This commit is contained in:
		
							
								
								
									
										5
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tmux.c
									
									
									
									
									
								
							@@ -110,18 +110,17 @@ make_label(const char *label)
 | 
			
		||||
{
 | 
			
		||||
	char		*base, resolved[PATH_MAX], *path, *s;
 | 
			
		||||
	struct stat	 sb;
 | 
			
		||||
	u_int		 uid;
 | 
			
		||||
	uid_t		 uid;
 | 
			
		||||
	int		 saved_errno;
 | 
			
		||||
 | 
			
		||||
	if (label == NULL)
 | 
			
		||||
		label = "default";
 | 
			
		||||
 | 
			
		||||
	uid = getuid();
 | 
			
		||||
 | 
			
		||||
	if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
 | 
			
		||||
		xasprintf(&base, "%s/tmux-%u", s, uid);
 | 
			
		||||
	else
 | 
			
		||||
		xasprintf(&base, "%s/tmux-%u", _PATH_TMP, uid);
 | 
			
		||||
		xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid);
 | 
			
		||||
 | 
			
		||||
	if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST)
 | 
			
		||||
		goto fail;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user