]> git.saurik.com Git - apt.git/commit
drop incorrect const attribute from DirectoryExists
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 12 Aug 2016 17:11:01 +0000 (19:11 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 5 Oct 2016 19:53:38 +0000 (21:53 +0200)
commitbc8c6ca0c1815b1c3141c177939e1efbdc9862e9
treed68d9ee6e06c74abcc1bfa264dc60f860d00cd2a
parent984a637a21acbbecc7ebec3f6eada09a221f068b
drop incorrect const attribute from DirectoryExists

Since its existence in 2010 DirectoryExists was always marked with this
attribute, but for no real reason. Arguably a check for the existence of
the file is not modifying global state, so theoretically this shouldn't
be a problem. It is wrong from a logical point of view through as
between two calls the directory could be created so the promise we made
to the compiler that it could remove the second call would be wrong, so
API wise it is wrong.

It's a bit mysterious that this is only observeable on ppc64el and can be
fixed by reordering code ever so slightly, but in the end its more our
fault for adding this attribute than the compilers fault for doing
something silly based on the attribute.

LP: 1473674
(cherry picked from commit 9445fa62386c80c9822e77484d30b2109aa0f2dc)
apt-pkg/contrib/fileutl.h