mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		| @@ -129,7 +129,7 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) | |||||||
| 	char				*pattern, *cwd; | 	char				*pattern, *cwd; | ||||||
| 	const char			*path, *error; | 	const char			*path, *error; | ||||||
| 	glob_t				 g; | 	glob_t				 g; | ||||||
| 	int				 i; | 	int				 i, result; | ||||||
| 	u_int				 j; | 	u_int				 j; | ||||||
|  |  | ||||||
| 	cdata = xcalloc(1, sizeof *cdata); | 	cdata = xcalloc(1, sizeof *cdata); | ||||||
| @@ -157,9 +157,15 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) | |||||||
| 			xasprintf(&pattern, "%s/%s", cwd, path); | 			xasprintf(&pattern, "%s/%s", cwd, path); | ||||||
| 		log_debug("%s: %s", __func__, pattern); | 		log_debug("%s: %s", __func__, pattern); | ||||||
|  |  | ||||||
| 		if (glob(pattern, 0, NULL, &g) != 0) { | 		if ((result = glob(pattern, 0, NULL, &g)) != 0) { | ||||||
| 			error = strerror(errno); | 			if (result != GLOB_NOMATCH || | ||||||
| 			if (errno != ENOENT || (~flags & CMD_PARSE_QUIET)) { | 			    (~flags & CMD_PARSE_QUIET)) { | ||||||
|  | 				if (result == GLOB_NOMATCH) | ||||||
|  | 					error = strerror(ENOENT); | ||||||
|  | 				else if (result == GLOB_NOSPACE) | ||||||
|  | 					error = strerror(ENOMEM); | ||||||
|  | 				else | ||||||
|  | 					error = strerror(EINVAL); | ||||||
| 				cmdq_error(item, "%s: %s", path, error); | 				cmdq_error(item, "%s: %s", path, error); | ||||||
| 				retval = CMD_RETURN_ERROR; | 				retval = CMD_RETURN_ERROR; | ||||||
| 			} | 			} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Thomas Adam
					Thomas Adam