Skip to content

Commit

Permalink
[Windows] Issue #127 - properly treat Windows UNC paths as absolute p…
Browse files Browse the repository at this point in the history
…aths
  • Loading branch information
mickelson committed May 23, 2015
1 parent 0bcfde0 commit 9a6737a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fe_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,15 @@ bool is_relative_path( const std::string &name )
&& ( name[1] == ':' )
&& (( name[2] == '\\' ) || ( name[2] == '/' )))
return false;
#endif

// Windows UNC i.e. \\computer\share
if (( name.size() > 1 )
&& ( name[0] == '\\' )
&& ( name[1] == '\\' ))
return false;
#else
return (( !name.empty() ) && ( name[0] != '/' ));
#endif
}

std::string clean_path( const std::string &path, bool require_trailing_slash )
Expand Down

0 comments on commit 9a6737a

Please sign in to comment.