mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
clean up ffmpeg downloading
This commit is contained in:
parent
8b78b69f57
commit
91416cb8a8
@ -228,9 +228,9 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||
string.Equals(filename, downloadinfo.FFMpegFilename, StringComparison.OrdinalIgnoreCase);
|
||||
}))
|
||||
{
|
||||
File.Copy(file, Path.Combine(targetFolder, Path.GetFileName(file)), true);
|
||||
|
||||
SetFilePermissions(targetFolder, file);
|
||||
var targetFile = Path.Combine(targetFolder, Path.GetFileName(file));
|
||||
File.Copy(file, targetFile, true);
|
||||
SetFilePermissions(targetFile);
|
||||
}
|
||||
}
|
||||
finally
|
||||
@ -239,12 +239,12 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||
}
|
||||
}
|
||||
|
||||
private void SetFilePermissions(string targetFolder, string file)
|
||||
private void SetFilePermissions(string path)
|
||||
{
|
||||
// Linux: File permission to 666, and user's execute bit
|
||||
if (_environment.OperatingSystem == OperatingSystem.Bsd || _environment.OperatingSystem == OperatingSystem.Linux || _environment.OperatingSystem == OperatingSystem.Osx)
|
||||
{
|
||||
Syscall.chmod(Path.Combine(targetFolder, Path.GetFileName(file)), FilePermissions.DEFFILEMODE | FilePermissions.S_IXUSR);
|
||||
Syscall.chmod(path, FilePermissions.DEFFILEMODE | FilePermissions.S_IXUSR);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user