mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 21:39:21 +00:00
Complete previous commit
This commit is contained in:
parent
96f3217db4
commit
63c792d497
@ -326,7 +326,7 @@ impl HttpRequestHandler {
|
||||
|
||||
|
||||
// Determine image destination
|
||||
let target_user_data_folder = prepare_file_creation(self.user_id()?, folder)?;
|
||||
let target_user_data_folder = prepare_file_creation(&self.user_id()?, folder)?;
|
||||
let target_file_path = generate_new_user_data_file_name(target_user_data_folder.as_path(), "png")?;
|
||||
let target_sys_path = user_data_path(target_file_path.as_path());
|
||||
|
||||
|
@ -27,7 +27,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> {
|
||||
pub fn prepare_file_creation(user_id: &UserID, folder: &str) -> ResultBoxError<PathBuf> {
|
||||
let subfolder = match user_id.id() {
|
||||
0 => Path::new(folder).to_path_buf(),
|
||||
id => Path::new(folder).join(to_string(&id)?)
|
||||
|
Loading…
Reference in New Issue
Block a user