Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
0b5100f7
Commit
0b5100f7
authored
May 26, 2017
by
Mark Olesen
Browse files
ENH: avoid calling fileName::components twice in Foam::cp
parent
4b32238d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OSspecific/POSIX/POSIX.C
View file @
0b5100f7
...
@@ -770,7 +770,7 @@ bool Foam::cp(const fileName& src, const fileName& dest, const bool followLink)
...
@@ -770,7 +770,7 @@ bool Foam::cp(const fileName& src, const fileName& dest, const bool followLink)
// If dest is a directory, create the destination file name.
// If dest is a directory, create the destination file name.
if
(
destFile
.
type
()
==
fileName
::
DIRECTORY
)
if
(
destFile
.
type
()
==
fileName
::
DIRECTORY
)
{
{
destFile
=
destFile
/
src
.
component
(
src
.
components
().
size
()
-
1
);
destFile
=
destFile
/
src
.
component
s
().
last
(
);
}
}
// Make sure the destination directory exists.
// Make sure the destination directory exists.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment