Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a
This commit is contained in:
parent
6a44daeaaa
commit
3a1fba4efe
1 changed files with 1301 additions and 196 deletions
|
|
@ -2,7 +2,9 @@
|
|||
// Only byte counts for Vulpes-owned storage cross the application boundary.
|
||||
let pending, cached;
|
||||
export async function storageStats(app) {
|
||||
if(app.id!=='settings')throw Error('PERMISSION_DENIED');
|
||||
const canReadStats = app.id === 'settings' ||
|
||||
(app.id === 'system' && app.manifest.permissions?.['device-storage:apps']?.access === 'readonly');
|
||||
if(!canReadStats)throw Error('PERMISSION_DENIED');
|
||||
if(cached && Date.now()-cached.at<5000)return cached.value;
|
||||
if(pending)return pending;
|
||||
pending=(async()=>{
|
||||
|
|
|
|||
Loading…
Reference in a new issue