Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong disk info on windows #27

Open
zwz opened this issue Oct 13, 2021 · 3 comments
Open

Wrong disk info on windows #27

zwz opened this issue Oct 13, 2021 · 3 comments

Comments

@zwz
Copy link

zwz commented Oct 13, 2021

Here is what I tried:

for(const disk of disks){
... console.log(disk)
... console.log(disk.filesystem)
... }
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'C:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'D:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'E:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'F:'
}
Local Fixed Disk
Drive {
_filesystem: 'CD-ROM Disc',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'G:'
}
CD-ROM Disc
undefined

@Ekristoffe
Copy link
Contributor

hi,
What windows are you using ?
What version of nodeJS ?
What version of node-disk-info ?
have you try the example code ?
What output does it give you ?

@zwz
Copy link
Author

zwz commented Nov 5, 2021

I am using
Windows7
node 13.14
with the latest version of node-disk-info.

This is the code I tried:

for(const disk of disks){
    console.log(disk)
    console.log(disk.filesystem)
}

And the output was:

Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'C:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'D:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'E:'
}
Local Fixed Disk
Drive {
_filesystem: 'Local Fixed Disk',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'F:'
}
Local Fixed Disk
Drive {
_filesystem: 'CD-ROM Disc',
_blocks: 0,
_used: 0,
_available: 0,
_capacity: '0%',
_mounted: 'G:'
}
CD-ROM Disc
undefined

@Ekristoffe
Copy link
Contributor

could you please use this command in a console (CMD in windows):
wmic logicaldisk get Caption,FreeSpace,Size,VolumeSerialNumber,Description /format:list
and paste the result here (if it is readable)

Indeed some data seems weird I think I need to check it again (also some changes are already in PR but still not accepted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants