Skip to content

Commit

Permalink
Merge pull request viveris#71 from skandigraun/master
Browse files Browse the repository at this point in the history
fix permissions on newly created folders
  • Loading branch information
jfdelnero committed Nov 28, 2021
2 parents e140e55 + 2e6b173 commit c9f2306
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ int parse_incomming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newh
return ret_code;
}

if(ctx->usb_cfg.val_umask >= 0)
chmod(tmp_path, 0777 & (~ctx->usb_cfg.val_umask));

tmp_file_entry.isdirectory = 1;
strcpy(tmp_file_entry.filename,tmp_str);
tmp_file_entry.size = 0;
Expand Down

0 comments on commit c9f2306

Please sign in to comment.