Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/48a5fa17b034947669d7ce0e81cbe599f628acf9
You should set ROOT_URL correctly, otherwise the web may not work correctly.
6 changed files with
47 additions and
14 deletions
@ -419,6 +419,25 @@ namespace Emby.Common.Implementations.IO
}
}
public void SetReadOnly ( string path , bool isReadOnly )
{
var info = GetFileInfo ( path ) ;
if ( info . Exists & & info . IsReadOnly ! = isReadOnly )
{
if ( isReadOnly )
{
File . SetAttributes ( path , File . GetAttributes ( path ) | FileAttributes . ReadOnly ) ;
}
else
{
FileAttributes attributes = File . GetAttributes ( path ) ;
attributes = RemoveAttribute ( attributes , FileAttributes . ReadOnly ) ;
File . SetAttributes ( path , attributes ) ;
}
}
}
private static FileAttributes RemoveAttribute ( FileAttributes attributes , FileAttributes attributesToRemove )
{
return attributes & ~ attributesToRemove ;
@ -564,6 +583,20 @@ namespace Emby.Common.Implementations.IO
public void DeleteFile ( string path )
{
var fileInfo = GetFileInfo ( path ) ;
if ( fileInfo . Exists )
{
if ( fileInfo . IsHidden )
{
SetHidden ( path , false ) ;
}
if ( fileInfo . IsReadOnly )
{
SetReadOnly ( path , false ) ;
}
}
File . Delete ( path ) ;
}
@ -1892,19 +1892,7 @@ namespace MediaBrowser.Controller.Entities
if ( info . IsLocalFile )
{
// Delete the source file
var currentFile = FileSystem . GetFileInfo ( info . Path ) ;
// Deletion will fail if the file is hidden so remove the attribute first
if ( currentFile . Exists )
{
if ( currentFile . IsHidden )
{
FileSystem . SetHidden ( currentFile . FullName , false ) ;
}
FileSystem . DeleteFile ( currentFile . FullName ) ;
}
FileSystem . DeleteFile ( info . Path ) ;
}
return UpdateToRepository ( ItemUpdateType . ImageUpdate , CancellationToken . None ) ;
@ -226,9 +226,12 @@ namespace MediaBrowser.LocalMetadata.Savers
if ( file . IsHidden )
{
FileSystem . SetHidden ( path , false ) ;
wasHidden = true ;
}
if ( file . IsReadOnly )
{
FileSystem . SetReadOnly ( path , false ) ;
}
}
using ( var filestream = FileSystem . GetFileStream ( path , FileOpenMode . Create , FileAccessMode . Write , FileShareMode . Read ) )
@ -305,6 +305,7 @@ namespace MediaBrowser.Model.IO
IEnumerable < string > GetFileSystemEntryPaths ( string path , bool recursive = false ) ;
void SetHidden ( string path , bool isHidden ) ;
void SetReadOnly ( string path , bool isHidden ) ;
char DirectorySeparatorChar { get ; }
@ -265,6 +265,10 @@ namespace MediaBrowser.Providers.Manager
{
_fileSystem . SetHidden ( file . FullName , false ) ;
}
if ( file . IsReadOnly )
{
_fileSystem . SetReadOnly ( path , false ) ;
}
}
using ( var fs = _fileSystem . GetFileStream ( path , FileOpenMode . Create , FileAccessMode . Write , FileShareMode . Read , true ) )
@ -221,6 +221,10 @@ namespace MediaBrowser.XbmcMetadata.Savers
wasHidden = true ;
}
if ( file . IsReadOnly )
{
FileSystem . SetReadOnly ( path , false ) ;
}
}
using ( var filestream = FileSystem . GetFileStream ( path , FileOpenMode . Create , FileAccessMode . Write , FileShareMode . Read ) )