MXS-589: Separated persistent and temporary data directories
Both the passwords and temporary files of the embedded library were stored in the same directory. Now the directories are separated and the embedded library uses the temporary directory. The datadir cleanup also now only cleans up the temporary data directory.
This commit is contained in:
@ -85,6 +85,17 @@ void set_datadir(char* param)
|
||||
maxscaledatadir = param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the data directory
|
||||
* @param str Path to directory
|
||||
*/
|
||||
void set_process_datadir(char* param)
|
||||
{
|
||||
free(processdatadir);
|
||||
clean_up_pathname(param);
|
||||
processdatadir = param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the library directory. Modules will be loaded from here.
|
||||
* @param str Path to directory
|
||||
@ -127,14 +138,23 @@ char* get_cachedir()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the service cache directory
|
||||
* @return The path to the cache directory
|
||||
* Get the MaxScale data directory
|
||||
* @return The path to the data directory
|
||||
*/
|
||||
char* get_datadir()
|
||||
{
|
||||
return maxscaledatadir ? maxscaledatadir : (char*) default_datadir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the process specific data directory
|
||||
* @return The path to the process specific directory
|
||||
*/
|
||||
char* get_process_datadir()
|
||||
{
|
||||
return processdatadir ? processdatadir : (char*) default_datadir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration file directory
|
||||
* @return The path to the configuration file directory
|
||||
|
||||
Reference in New Issue
Block a user