You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I was getting a regex error on windows with an input file path of e.g. "c:\some path with a space\somemorepath\inputdirectoryname" in the method getInputPathSubDirsToCleanup
I looked at the code and guessed that it was because the use of the File.Separator being used as a regex. String.split() cannot cope with non escaped backslashes as the regex (which is what File.Separator is on Windows i.e. '').
From what I googled Pattern.quote() appears to be the right method to fix this...
e.g.
Original (line 225)
for (String subDirName : this.inputPathSubDir.split(File.separator)) {
Altered to :
for (String subDirName : this.inputPathSubDir.split( Pattern.quote( File.separator ) )) {
I have tested this code and it works on windows - but have no way of testing this on linux et al so did not want to commit (nor am I a committer etc)
Could someone who runs on linux test this fix and commit ?
thanks !
John.
The text was updated successfully, but these errors were encountered:
Hi,
I was getting a regex error on windows with an input file path of e.g. "c:\some path with a space\somemorepath\inputdirectoryname" in the method getInputPathSubDirsToCleanup
I looked at the code and guessed that it was because the use of the File.Separator being used as a regex. String.split() cannot cope with non escaped backslashes as the regex (which is what File.Separator is on Windows i.e. '').
From what I googled Pattern.quote() appears to be the right method to fix this...
e.g.
Original (line 225)
for (String subDirName : this.inputPathSubDir.split(File.separator)) {
Altered to :
for (String subDirName : this.inputPathSubDir.split( Pattern.quote( File.separator ) )) {
I have tested this code and it works on windows - but have no way of testing this on linux et al so did not want to commit (nor am I a committer etc)
Could someone who runs on linux test this fix and commit ?
thanks !
John.
The text was updated successfully, but these errors were encountered: