View Issue Details

IDProjectCategoryView StatusLast Update
0002974OpenFOAMBugpublic2018-06-11 12:03
Reporterttocci Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSCentosOS Version7
Product Versiondev 
Fixed in Versiondev 
Summary0002974: foamDictionary ignore -case switch
DescriptionThe foamDictionary command ignore the -case switch.
In particular if both -case and -value command line option are used, the value should be considered relative to the case directory and not to the current working directory.
Steps To Reproduce
export CASE=/home/ttocci/foam_case

foamDictionary -case $CASE -disableFunctionEntries -entry numberOfSubdomains -value system/decomposeParDict

In this case foamDictionary would try to open $PWD/system/decomposeParDict instead of $CASE/system/decomposeParDict
TagsNo tags attached.

Activities

chris

2018-06-11 08:56

manager   ~0009732

The -value option is not relevant here in itself. The file name is not an argument to the -value option.

The issue is simply that: (1) foamDictionary takes a filename as an argument; (2) foamDictionary does not need to know anything about the case directory. This means the -case option is currently redundant. The following will work instead:

foamDictionary -entry numberOfSubdomains -value $CASE/system/decomposeParDict

On that basis, we could:
1) remove the -case option to avoid confusion; or,
2) include -case as a way to specify the filename by a relative path.

The latter might be slightly beneficial for scripting, but has the disadvantage for general use that the TAB completion does not work with a relative path.

henry

2018-06-11 12:03

manager   ~0009738

Resolved by commit dc2c1e2d6d62717cd05ff6d7d87e1ab25c2daefe

Issue History

Date Modified Username Field Change
2018-06-06 18:02 ttocci New Issue
2018-06-11 08:56 chris Note Added: 0009732
2018-06-11 12:03 henry Assigned To => henry
2018-06-11 12:03 henry Status new => resolved
2018-06-11 12:03 henry Resolution open => fixed
2018-06-11 12:03 henry Fixed in Version => dev
2018-06-11 12:03 henry Note Added: 0009738