Commit fc41548b authored by petter's avatar petter

with failsafe handling of non-existing record-directories


git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@108 0463f305-d864-43cb-8a47-61cf597d4139
parent a798ea50
......@@ -443,8 +443,12 @@ public class Recorder implements MessageConsumer, Closeable {
synchronized public void startRec() throws IOException {
// get filename
file = null;
if (file == null)
file = new File(TTT.userPrefs.get("record_path", ".") + File.separator + lectureProfile.getFilename());
if (file == null){
String recpath = TTT.userPrefs.get("record_path", ".");
File recFile =new File(recpath);
if (!recFile.exists()) recFile.mkdirs();
file = new File(recpath + File.separator + lectureProfile.getFilename());
}
file = new File(getValidFilename(file.getCanonicalPath()) + Constants.desktopEndings[0]);
startRec(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment