From a6740cffd2dfb3af5694f1e100da2a6e629f2226 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 14 Mar 2011 14:14:46 +0000 Subject: [PATCH] Fixed warning on existing links --- .../decomposePar/decomposePar.C | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index f00b31497..2738665c4 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -880,17 +880,20 @@ int main(int argc, char *argv[]) } else { - // link with relative paths + // Link with relative paths const string parentPath = string("..")/".."; fileName currentDir(cwd()); chDir(timePath); - ln - ( - parentPath/runTime.timeName()/uniformDir, - uniformDir - ); - chDir(currentDir); + if (!exists(parentPath/runTime.timeName()/uniformDir)) + { + ln + ( + parentPath/runTime.timeName()/uniformDir, + uniformDir + ); + chDir(currentDir); + } } } }