mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-31 03:58:38 -05:00 
			
		
		
		
	dll: fsp_fuse_opt_add_opt: testing
This commit is contained in:
		| @@ -495,22 +495,24 @@ static int fsp_fuse_opt_add_opt_internal(char **opts, const char *opt, int escap | |||||||
|     newopts = memalloc(optsize + optlen + 1); |     newopts = memalloc(optsize + optlen + 1); | ||||||
|     if (0 == newopts) |     if (0 == newopts) | ||||||
|         return -1; |         return -1; | ||||||
|     memfree(*opts); |  | ||||||
|     *opts = newopts; |  | ||||||
|  |  | ||||||
|     if (0 != optsize) |     if (0 != optsize) | ||||||
|     { |     { | ||||||
|         memcpy(newopts, *opts, optsize - 1); |         memcpy(newopts, *opts, optsize - 1); | ||||||
|         newopts[optsize - 1] = ','; |         newopts[optsize - 1] = ','; | ||||||
|         newopts += optsize; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     memfree(*opts); | ||||||
|  |     *opts = newopts; | ||||||
|  |     newopts += optsize; | ||||||
|  |  | ||||||
|     for (p = opt; *p; p++, newopts++) |     for (p = opt; *p; p++, newopts++) | ||||||
|     { |     { | ||||||
|         if (escaped && (',' == *p || '\\' == *p)) |         if (escaped && (',' == *p || '\\' == *p)) | ||||||
|             *newopts++ = '\\'; |             *newopts++ = '\\'; | ||||||
|         *newopts = *p; |         *newopts = *p; | ||||||
|     } |     } | ||||||
|  |     *newopts = '\0'; | ||||||
|  |  | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user