mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Ignore all errors when getting free storage space
It's not a critical check that needs to be perfomed, so in case something does not work on some device/version, let's just ignore the error.
This commit is contained in:
		| @@ -11,7 +11,6 @@ import android.database.Cursor; | ||||
| import android.net.Uri; | ||||
| import android.os.ParcelFileDescriptor; | ||||
| import android.provider.DocumentsContract; | ||||
| import android.system.ErrnoException; | ||||
| import android.system.Os; | ||||
| import android.system.StructStatVfs; | ||||
| import android.util.Log; | ||||
| @@ -207,7 +206,9 @@ public class StoredDirectoryHelper { | ||||
|  | ||||
|             // this is the same formula used inside the FsStat class | ||||
|             return stat.f_bavail * stat.f_frsize; | ||||
|         } catch (final IOException | ErrnoException e) { | ||||
|         } catch (final Throwable e) { | ||||
|             // ignore any error | ||||
|             Log.e(TAG, "Could not get free storage space", e); | ||||
|             return Long.MAX_VALUE; | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox