diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-09-09 17:54:53 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-09-09 17:54:53 +0000 |
commit | 831fabaf6198e7bfd1509ed9bc1fc7827c139733 (patch) | |
tree | 998aa497bdafbc1c98208caac983151fae93ed4f /smcc/src/main/java/at | |
parent | f08529a5cb52d180db8b09b2cc02602ec70abaee (diff) | |
download | mocca-831fabaf6198e7bfd1509ed9bc1fc7827c139733.tar.gz mocca-831fabaf6198e7bfd1509ed9bc1fc7827c139733.tar.bz2 mocca-831fabaf6198e7bfd1509ed9bc1fc7827c139733.zip |
Allow user to set SWCard directory
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1207 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main/java/at')
-rw-r--r-- | smcc/src/main/java/at/gv/egiz/smcc/SWCard.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java index a896c9a1..62f3e3e3 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/SWCard.java @@ -25,6 +25,7 @@ package at.gv.egiz.smcc; import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -97,6 +98,16 @@ public class SWCard implements SignatureCard { String userHome = System.getProperty("user.home"); String fs = System.getProperty("file.separator"); swCardDir = userHome + fs + BKU_USER_DIR + fs + SWCARD_DIR; + String swcDir = System.getProperty("mocca.swcard.directory"); + if (swcDir != null) { + File f = new File(swcDir); + if (!f.isAbsolute()) { + swcDir = userHome + fs + BKU_USER_DIR + fs + swcDir; + f = new File(swcDir); + } + if (f.isDirectory()) + swCardDir = swcDir; + } } /** |