Don't run the pp script in the directory of the recording
On widows, running the script in the directory of the recording results in a filesystem lock on the directory, so that it cannot be deleted.
This commit is contained in:
parent
bbe0239ae1
commit
ccee14e2ae
|
@ -187,7 +187,7 @@ public class LocalRecorder implements Recorder {
|
|||
Long.toString(download.getStartTime().getEpochSecond())
|
||||
};
|
||||
LOG.debug("Running {}", Arrays.toString(args));
|
||||
Process process = rt.exec(args, OS.getEnvironment(), download.getDirectory());
|
||||
Process process = rt.exec(args, OS.getEnvironment());
|
||||
Thread std = new Thread(new StreamRedirectThread(process.getInputStream(), System.out));
|
||||
std.setName("Process stdout pipe");
|
||||
std.setDaemon(true);
|
||||
|
|
|
@ -14,4 +14,6 @@ $date = $epoch.AddSeconds($time)
|
|||
# print out a theoretical new file name, you could use "rename" here, to rename the file
|
||||
# or move it somewhere or ...
|
||||
$newname = "$($model)_$($site)_$($date.toString("yyyyMMdd-HHmm")).ts"
|
||||
ren $file $newname
|
||||
Rename-Item -Path $file -NewName $newname
|
||||
Move-Item -Path "$($dir)\$($newname)" -Destination "c:\Users\username\Desktop\$($newname)"
|
||||
Remove-Item -Path $dir
|
||||
|
|
Loading…
Reference in New Issue