This PR adds a new function to the ProjectHandler class that retrieves the full path to the output file for the specified form and language. This also eliminates a duplicate single-level folder. E.g., given a project output file called generate and a form base_file called generate/my_form this will remove the duplicate generate folder. The upside is that this will fix the most common error where the folder portion was entered by hand even though it wasn't needed. It will, however, prevent the user from specifying nested folders containing the same name (i.e., generate/generate/my_form won't work if project output directory is set to generate/).
The second part of this PR adds a isGenerating() to App and uses that in FileCodeWriter::WriteFile() to determine whether or not to ask the user permission to create a directory that was specified, but doesn't exist. This allows the code writer to create a missing directory as long as code generation is running from the command line.
This PR adds a new function to the
ProjectHandler
class that retrieves the full path to the output file for the specified form and language. This also eliminates a duplicate single-level folder. E.g., given a project output file calledgenerate
and a form base_file calledgenerate/my_form
this will remove the duplicategenerate
folder. The upside is that this will fix the most common error where the folder portion was entered by hand even though it wasn't needed. It will, however, prevent the user from specifying nested folders containing the same name (i.e.,generate/generate/my_form
won't work if project output directory is set togenerate/
).The second part of this PR adds a
isGenerating()
to App and uses that in FileCodeWriter::WriteFile() to determine whether or not to ask the user permission to create a directory that was specified, but doesn't exist. This allows the code writer to create a missing directory as long as code generation is running from the command line.See #1366