Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzbk committed Apr 17, 2024
1 parent 9f2738f commit a75ea45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions daemon/main/nzbget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ void NZBGet::Init()
BootConfig();

#ifndef WIN32
int uMask = m_options->GetUMask();
if (uMask > 0 && uMask < 1000)
mode_t uMask = static_cast<mode_t>(m_options->GetUMask());
if (uMask > 0 && uMask < 01000)
{
/* set newly created file permissions */
FileSystem::uMask = uMask;
Expand All @@ -284,6 +284,11 @@ void NZBGet::Init()
FileSystem::uMask = umask(022);
umask(FileSystem::uMask);
}

#ifdef DEBUG
debug("Using %o umask", FileSystem::uMask);
#endif

#endif

m_scanner->InitOptions();
Expand Down
2 changes: 1 addition & 1 deletion daemon/util/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ bool FileSystem::FlushDirBuffers(const char* filename, CString& errmsg)

#ifndef WIN32

mode_t FileSystem::uMask
mode_t FileSystem::uMask;

void FileSystem::FixExecPermission(const char* filename)
{
Expand Down

0 comments on commit a75ea45

Please sign in to comment.