Skip to content

Commit

Permalink
fix: WADO-URI's storeParh incorrect
Browse files Browse the repository at this point in the history
# Problem
- `storeParh` need to append slash in `DICOM_STORE_ROOTPATH` env
- If not appned, it will get `rootfiles/item`,
but correct is `root/files/item`

# Solution
- Use `path.join` instead string concat
  • Loading branch information
Chinlinlee committed Jan 4, 2023
1 parent 863dec0 commit 8a5cf54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/dicom/controller/wado.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module.exports = async(req, res) =>
if (!oriPath) {
return dicomWebHandleError.sendNotFoundMessage(req , res);
}
let storePath = `${disk}${oriPath}`;

let storePath = path.join(disk, oriPath);
if (!fs.existsSync(storePath)) {
return dicomWebHandleError.sendNotFoundMessage(req , res);
}
Expand Down

0 comments on commit 8a5cf54

Please sign in to comment.