MRI: dataDirectory: Return "." if customDataPath is not defined
This commit is contained in:
		
							parent
							
								
									88c41bcc62
								
							
						
					
					
						commit
						4b08d82ea4
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -192,8 +192,11 @@ RB_METHOD(mriP)
 | 
				
			||||||
RB_METHOD(mkxpDataDirectory)
 | 
					RB_METHOD(mkxpDataDirectory)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	RB_UNUSED_PARAM;
 | 
						RB_UNUSED_PARAM;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						const std::string &path = shState->config().customDataPath;
 | 
				
			||||||
 | 
						const char *s = path.empty() ? "." : path.c_str();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return rb_str_new_cstr(shState->config().customDataPath.c_str());
 | 
						return rb_str_new_cstr(s);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RB_METHOD(mkxpPuts)
 | 
					RB_METHOD(mkxpPuts)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue