mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-10 20:29:40 +00:00
Merge branch 'advplyr:master' into inode-bug-fix
This commit is contained in:
commit
925c8aff91
39 changed files with 1143 additions and 286 deletions
|
|
@ -502,7 +502,7 @@ module.exports.getWindowsDrives = async () => {
|
|||
return []
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
exec('wmic logicaldisk get name', async (error, stdout, stderr) => {
|
||||
exec('powershell -Command "(Get-PSDrive -PSProvider FileSystem).Name"', async (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
reject(error)
|
||||
return
|
||||
|
|
@ -511,10 +511,9 @@ module.exports.getWindowsDrives = async () => {
|
|||
?.split(/\r?\n/)
|
||||
.map((line) => line.trim())
|
||||
.filter((line) => line)
|
||||
.slice(1)
|
||||
const validDrives = []
|
||||
for (const drive of drives) {
|
||||
let drivepath = drive + '/'
|
||||
let drivepath = drive + ':/'
|
||||
if (await fs.pathExists(drivepath)) {
|
||||
validDrives.push(drivepath)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue