1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 00:15:17 +00:00

Upgrade UserID to a structure

This commit is contained in:
2020-06-25 10:08:34 +02:00
parent 444cad6e09
commit 96f3217db4
25 changed files with 180 additions and 153 deletions

View File

@ -28,7 +28,7 @@ pub fn user_data_path(uri: &Path) -> PathBuf {
/// This function returns the relative folder path in user data directory where the file can be
/// created
pub fn prepare_file_creation(user_id: UserID, folder: &str) -> ResultBoxError<PathBuf> {
let subfolder = match user_id {
let subfolder = match user_id.id() {
0 => Path::new(folder).to_path_buf(),
id => Path::new(folder).join(to_string(&id)?)
};