I am struggling to understand if this is a bug or a feature of the new File System API. When using showDirectoryPicker and selecting the standard Windows documents directory, or the downloads directory, a pop-up appears stating that it can't open the folder because it contains system files, which it does not. Has anyone found a way around this, or am I missing something obvious?
Here is a fully functional example:
<!DOCTYPE HTML>
<html>
<head>
<title>File System API</title>
</head>
<button onclick="checkDirExists();">Initialize</button>
<body>
</body>
<script>
async function checkDirExists(){
const homeDirHdl = await window.showDirectoryPicker({
startIn: 'documents',
});
if (homeDirHdl){
const draftsDirHdl = await homeDirHdl.getDirectoryHandle('drafts', {create: true});
}
}
</script>
</html>