File tree Expand file tree Collapse file tree
src/uucore/src/lib/features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,14 +167,18 @@ impl FileInformation {
167167 return self . 0 . st_ino . into ( ) ;
168168 }
169169
170+ // The concept of symlinks doesn't map exactly to Windows (which has reparse
171+ // points, junctions, etc.), so having our own method lets us control what
172+ // we consider a symlink across platforms.
170173 #[ cfg( unix) ]
171174 pub fn is_symlink ( & self ) -> bool {
172175 ( self . 0 . st_mode as mode_t & S_IFMT ) == S_IFLNK
173176 }
174177
175178 #[ cfg( windows) ]
176179 pub fn is_symlink ( & self ) -> bool {
177- ( self . 0 . file_attributes ( ) & windows_sys:: Win32 :: Storage :: FileSystem :: FILE_ATTRIBUTE_REPARSE_POINT ) != 0
180+ use windows_sys:: Win32 :: Storage :: FileSystem :: FILE_ATTRIBUTE_REPARSE_POINT ;
181+ self . 0 . file_attributes ( ) & u64:: from ( FILE_ATTRIBUTE_REPARSE_POINT ) != 0
178182 }
179183}
180184
You can’t perform that action at this time.
0 commit comments