fixed: winix incorrectly used config options: upload_dirs_chmod and upload_files_chmod

added: to config: upload_group
       a group name for newly uploaded files (and created necessary directories in the file system)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@961 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2014-09-28 17:30:05 +00:00
parent f064ff6b3d
commit e3284dcfbc
10 changed files with 123 additions and 23 deletions

View File

@@ -514,10 +514,16 @@ void Image::SaveImage()
item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB ||
item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB );
if( system->MakeFilePath(file_work, dst_path, thumb, true, config->upload_dirs_chmod) )
if( system->MakeFilePath(file_work, dst_path, thumb, true, config->upload_dirs_chmod, config->upload_group_int) )
{
if( RenameFile(stream_tmp_path.Str(), dst_path) )
{
// it doesn't matter for us if there is an error when chmod/chown on a file
// the admin (root) will correct it
std::string dst_patha; // IMPROVE ME temporary -- in the futere there'll be SetPriv() with std::wstring
PT::WideToUTF8(dst_path, dst_patha);
SetPriv(dst_patha, config->upload_files_chmod, config->upload_group_int);
ImageSavedCorrectly();
}
else