NilObject thrown in built but not during debug

Thanks for reminder. I do have processes for checking those files.
The first line of processing a new file to this OS, or general checking of order, are for crossplatform

#If TargetWindows//OsConvert Start
  aFile = aFile.ReplaceLineEndings(EOL)
  If aFile.IndexOf("/") > -1 Then aFile = aFile.ReplaceAll( "/", FilSep )
  
  aFile = aFile.ReplaceAll( "<\", "</" )//For html type codings
#ElseIf TargetLinux Or TargetMacOS
  aFile = aFile.ReplaceLineEndings(EndOfLine.Unix)
  If aFile.IndexOf("\") > -1 Then aFile = aFile.ReplaceAll( "\", FilSep )
#EndIf//OsConvert End

Not to be too petty, but

was posted well before

but Jeff gets the “Solution”?

1 Like

It happens to others as well. I usually ignore that and remember the “Solution” mark is more than often not reliable anyway.

1 Like

Ouch.

Better set a ‘base folder’ folderitem in code when the app starts, then use
mybasefolder.child(thefiename) when you need it
Dont mess about with slashes and replacing things.

4 Likes