CC-3531: When importing watched directory, correcting a file's permissions does not work correctly.
-fixed
This commit is contained in:
parent
45fcedfbd3
commit
f8a71a3923
|
@ -187,9 +187,14 @@ class AirtimeNotifier(Notifier):
|
|||
|
||||
mm = self.proc_fun()
|
||||
|
||||
self.mmc.set_needed_file_permissions(directory, True)
|
||||
for (path, dirs, files) in os.walk(directory):
|
||||
|
||||
for d in dirs:
|
||||
self.mmc.set_needed_file_permissions(os.path.join(path, d), True)
|
||||
|
||||
for filename in files:
|
||||
full_filepath = path+"/"+filename
|
||||
full_filepath = os.path.join(path, filename)
|
||||
|
||||
if self.mmc.is_audio_file(full_filepath):
|
||||
if self.mmc.set_needed_file_permissions(full_filepath, False):
|
||||
|
|
|
@ -75,7 +75,7 @@ class MediaMonitorCommon:
|
|||
def set_needed_file_permissions(self, item, is_dir):
|
||||
try:
|
||||
omask = os.umask(0)
|
||||
if not self.has_correct_permissions(item, 'www-data', 'www-data'):
|
||||
if not self.has_correct_permissions(item, 'www-data', 'www-data') or not self.has_correct_permissions(item, 'pypo', 'pypo'):
|
||||
# stats.st_mode is the original permission
|
||||
# stat.S_IROTH - readable by all permission
|
||||
# stat.S_IXOTH - excutable by all permission
|
||||
|
|
Loading…
Reference in New Issue