Skip to content

Commit

Permalink
[CBRD-24659] Add linux style absolute path as windows style also (#4106)
Browse files Browse the repository at this point in the history
change windows absolute path to /abc.txt, c:/abc.txt, c:\abc.txt style
  • Loading branch information
kisoo-han authored Feb 14, 2023
1 parent 679eca4 commit c1db9f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/base/porting.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ check_is_array (const T & a)
#endif /* WINDOWS */
#define PATH_CURRENT '.'

#if defined (WINDOWS)
#define IS_PATH_SEPARATOR(c) ((c) == PATH_SEPARATOR || (c) == '/')
#else
#define IS_PATH_SEPARATOR(c) ((c) == PATH_SEPARATOR)
#endif

#if defined (WINDOWS)
#define IS_ABS_PATH(p) IS_PATH_SEPARATOR((p)[0]) \
Expand Down

0 comments on commit c1db9f8

Please sign in to comment.