View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002726 | OpenFOAM | Bug | public | 2017-10-17 13:20 | 2017-10-20 11:35 |
Reporter | tniemi | Assigned To | henry | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0002726: foamDictionary: problem with #include-statement in a subdict with disableFunctionEntries | ||||
Description | I was trying to use foamDictionary inside a loop to modify values in a dictionary which also had #include-statement inside a subdict. I didn't want to expand that include, so I used disableFunctionEntries flag. However, this seemed to corrupt the dictionary file after two rounds of modifications. I have attached a minimal test-dictionary. Running the following command two or more times shows the issues: foamDictionary -entry a -set val -disableFunctionEntries testDict foamDictionary seems to delete newlines when writing the #include line first time. This is not problematic by itself, but if there is a "}"-symbol at the end of the line, additional closing brackets will get injected and the structure of the dict gets corrupted. | ||||
Tags | No tags attached. | ||||
|
testDict (858 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2; format ascii; class dictionary; location "constant"; object testDict; } subDict { #include "someFile" } a val; // ************************************************************************* // |
|
Resolved by commit aaa8405bd1d006a9b35877fb232a6eebf5b01db5 |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-17 13:20 | tniemi | New Issue | |
2017-10-17 13:20 | tniemi | File Added: testDict | |
2017-10-20 11:35 | henry | Assigned To | => henry |
2017-10-20 11:35 | henry | Status | new => resolved |
2017-10-20 11:35 | henry | Resolution | open => fixed |
2017-10-20 11:35 | henry | Fixed in Version | => dev |
2017-10-20 11:35 | henry | Note Added: 0008900 |