mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
use correct paths in analytics
This commit is contained in:
parent
1ac4e648da
commit
44fd94d5e6
1 changed files with 2 additions and 2 deletions
|
|
@ -30,13 +30,13 @@ export function useAnalyticsIdentity() {
|
|||
|
||||
// Count notes for total_notes property
|
||||
try {
|
||||
const entries = await window.ipc.invoke('workspace:readdir', { path: '/' })
|
||||
const entries = await window.ipc.invoke('workspace:readdir', { path: '' })
|
||||
let totalNotes = 0
|
||||
if (entries) {
|
||||
for (const entry of entries) {
|
||||
if (entry.kind === 'dir') {
|
||||
try {
|
||||
const sub = await window.ipc.invoke('workspace:readdir', { path: `/${entry.name}` })
|
||||
const sub = await window.ipc.invoke('workspace:readdir', { path: `${entry.name}` })
|
||||
totalNotes += sub?.length ?? 0
|
||||
} catch {
|
||||
// skip inaccessible dirs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue