Skip to content

Commit 8d89a11

Browse files
committed
fix: node tauri paths working in webworkers and tests
1 parent 651ea8b commit 8d89a11

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/worker-task.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ function checkDeleteInPath(path) {
6060
function checkStatInPath(path) {
6161
console.log('worker: checkStatInPath');
6262
fs.stat(path, (err, stat)=>{
63-
if(!err && stat.dev.startsWith("tauriWS")){
63+
if(!err){
64+
if(path.startsWith("/tauri/") && !stat.dev.startsWith("tauriWS")){
65+
console.error(`Stats device not as expected, expected "tauriWS_<number>" but got "${stat.dev}":`, err, stat);
66+
return;
67+
}
6468
postMessage('checkStatInPath.ok');
6569
return;
6670
}
67-
console.error('Stats error/not as expected:', err, stat);
71+
console.error('Stats error:', err, stat);
6872
});
6973
}
7074

0 commit comments

Comments
 (0)