Fix atom::PATH_END so it's greater than PATH_START. (#18339)

Previously the enum list ended with entries copied values
from base::PATH_ entries, so the subsequent entry (PATH_END)
had a value in (base::PATH_START..base::PATH_END].

This only a correctness patch. atom::PATH_END doesn't appear
to be used anywhere and it was the only atom::PATH_ enum
bitten by this.
This commit is contained in:
Charles Kerr 2019-05-21 01:35:01 -05:00 committed by Cheng Zhao
parent 340014a9d3
commit cac50608d6

View file

@ -28,19 +28,23 @@ enum {
#if defined(OS_LINUX) #if defined(OS_LINUX)
DIR_APP_DATA, // Application Data directory under the user profile. DIR_APP_DATA, // Application Data directory under the user profile.
#else #endif
PATH_END, // End of new paths. Those that follow redirect to base::DIR_*
#if !defined(OS_LINUX)
DIR_APP_DATA = base::DIR_APP_DATA, DIR_APP_DATA = base::DIR_APP_DATA,
#endif #endif
#if defined(OS_POSIX) #if defined(OS_POSIX)
DIR_CACHE = base::DIR_CACHE, // Directory where to put cache data. DIR_CACHE = base::DIR_CACHE // Directory where to put cache data.
#else #else
DIR_CACHE = base::DIR_APP_DATA, DIR_CACHE = base::DIR_APP_DATA
#endif #endif
PATH_END
}; };
static_assert(PATH_START < PATH_END, "invalid PATH boundaries");
} // namespace atom } // namespace atom
#endif // ATOM_BROWSER_ATOM_PATHS_H_ #endif // ATOM_BROWSER_ATOM_PATHS_H_