labstreaminglayer / App-LabRecorder

An application for streaming one or more LSL streams to disk in XDF file format.
MIT License
128 stars 45 forks source link

Bug in filename #30

Closed cboulay closed 4 years ago

cboulay commented 4 years ago

From a user in Slack:

I would like to set up the Labrecorder to store recordings to C:\Recordings\exp%p%b.xdf (running Windows 10 OS) When i set the storageLocation in the config File to: StorageLocation="C:\Recordings\exp%p%b.xdf" the result is that LabRecorder simply ignores the Recordings Subfolder and saves the File directly to C:\ The only way to get it to save to the correct Folder is to add a (nonexistent) subfolder to the Storage Location: StorageLocation="C:\Recordings\xyz\exp%p%b.xdf" Now it again ignores the last subfolder before the FIleName and saves to the intended Location. I don't think this is the intended behaviour. Am i doing something wrong?

I haven't investigated yet, but it's either in parsing the storage location somewhere around here or buildFilename or when starting recording here.

cboulay commented 4 years ago

Same as #18

cboulay commented 4 years ago

The bug was that the StorageLocation path-part first went through a Path() op then another AbsolutePath()... and (I think) each one trims off the end and gives the parent. So this resulted in parent-of-parent. In the fix, the first Path() was removed and only one call to AbsolutePath() is kept.