SBU-BMI / SlicerPathology

3D Slicer extension for Pathology segmentation tools
http://bmi.stonybrookmedicine.edu
Other
5 stars 8 forks source link

runtime error: permission denied on Windows #83

Closed tdiprima closed 7 years ago

tdiprima commented 7 years ago

The permission denied issue on Windows arises when a user tries to write to the working directory (in this case "Program Files\Slicer...").

Set the default data directory to the user's home folder; not the working directory.

(Will work if user starts Slicer as admin.)

fedorov commented 7 years ago

You should always use Slicer temporary directory, and create a sub-directory for your extension, to store any temporary data that is needed by your extension. Slicer temporary directory location is in slicer.app.temporaryPath.

xref https://github.com/SBU-BMI/SlicerPathology/issues/82#issuecomment-300777732

tdiprima commented 7 years ago

Fixed.

  1. Using Slicer temporary directory, creating sub-directory for our extension
  2. ctkDirectoryButton – By default, directory is the current working directory(*).
    • We are setting default to user's home directory (*nix & Windows compatible)