mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-04 13:27:21 +08:00 
			
		
		
		
	Cleanup errors that are not fatal during filesystem cleanup
This commit is contained in:
		@ -19,7 +19,7 @@ func CleanupOldContent(baseDirectory string) {
 | 
			
		||||
 | 
			
		||||
	files, err := getAllFilesRecursive(baseDirectory)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Errorln("Unable to cleanup old video files", err)
 | 
			
		||||
		log.Debugln("Unable to cleanup old video files", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -37,7 +37,7 @@ func CleanupOldContent(baseDirectory string) {
 | 
			
		||||
			fileToDelete := filepath.Join(baseDirectory, directory, file.Name())
 | 
			
		||||
			err := os.Remove(fileToDelete)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				log.Errorln(err)
 | 
			
		||||
				log.Debugln(err)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@ -64,7 +64,6 @@ func getAllFilesRecursive(baseDirectory string) (map[string][]os.FileInfo, error
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf(err.Error())
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user