git-annex/Utility
Joey Hess 8a4cfd4f2d
use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink
Fix crash importing from a directory special remote that contains a broken
symlink.

The crash was in listImportableContentsM but some other places in
Remote.Directory also seemed like they could have the same problem.

Also audited for other places that have such a problem. Not all calls
to getFileStatus are bad, in some cases it's better to crash on something
unexpected. For example, `git-annex import path` when the path is a broken
symlink should crash, the same as when it does not exist. Many of the
getFileStatus calls are like that, particularly when they involve
.git/annex/objects which should never have a broken symlink in it.

Fixed a few other possible cases of the problem.

Sponsored-by: Lawrence Brogan on Patreon
2022-09-05 13:46:32 -04:00
..
Directory improve createDirectoryUnder to allow alternate top directories 2022-08-12 12:52:37 -04:00
DirWatcher fix build on openbsd 2021-02-01 11:53:31 -04:00
Env
LockFile fix case of Win32 2022-08-04 12:17:27 -04:00
LockPool fix build on windows 2021-12-09 13:39:16 -04:00
Path fix quickcheck test on windows 2022-03-22 13:53:55 -04:00
Process fix missing new lines in processTranscript 2021-08-02 13:42:27 -04:00
Scheduled
Tmp avoid using removePathForcibly everywhere, it is unsafe 2022-05-02 14:06:20 -04:00
Aeson.hs fix build warning with old aeson 2022-03-07 13:29:24 -04:00
Android.hs
Applicative.hs
Attoparsec.hs
AuthToken.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
Base64.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
Batch.hs add searchPathContents 2021-02-02 19:06:15 -04:00
Bloom.hs
CoProcess.hs
CopyFile.hs use RawFilePath version of rename 2022-06-22 16:47:34 -04:00
Daemon.hs set cwd rarher than changing current process directory 2021-05-12 17:44:22 -04:00
Data.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
DataUnits.hs rename memoryUnits 2022-05-05 15:35:11 -04:00
DBus.hs
Debug.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
DebugLocks.hs
Directory.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
DirWatcher.hs
DiskFree.hs
Dot.hs
DottedVersion.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Env.hs
Exception.hs comment typo 2021-01-21 14:13:55 -04:00
FileMode.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
FileSize.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
FileSystemEncoding.hs improve comments 2021-12-08 18:59:22 -04:00
Format.hs export encode_c' 2020-12-09 15:28:45 -04:00
FreeDesktop.hs
GitLFS.hs git-lfs gitlab interoperability fix 2021-11-10 13:51:11 -04:00
Glob.hs Windows: include= and exclude= containing '/' will also match filenames that are written using '\' 2020-12-15 12:39:34 -04:00
Gpg.hs avoid setEnv while testing gpg 2022-05-18 16:05:11 -04:00
Hash.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
HtmlDetect.hs addurl: Avoid crashing when used on beegfs. 2021-07-05 13:02:40 -04:00
HumanNumber.hs Fix a rounding bug in display of data sizes 2021-07-30 09:56:04 -04:00
HumanTime.hs avoid parseDuration succeeding on empty string 2020-12-08 12:51:56 -04:00
InodeCache.hs use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink 2022-09-05 13:46:32 -04:00
IPAddress.hs fix typo 2022-06-23 13:54:34 -04:00
libkqueue.c
libkqueue.h
LinuxMkLibs.hs remove obsolete libgcc1 2021-10-21 03:02:16 -04:00
LockFile.hs
LockPool.hs
LogFile.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
Lsof.hs
MagicWormhole.hs add searchPathContents 2021-02-02 19:06:15 -04:00
Matcher.hs fix build with assistant disabled and webapp enabled 2022-06-29 14:19:18 -04:00
MD5.hs
Metered.hs rename memoryUnits 2022-05-05 15:35:11 -04:00
Misc.hs
Monad.hs
Mounts.hs
MoveFile.hs use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink 2022-09-05 13:46:32 -04:00
Network.hs
NotificationBroadcaster.hs
OptParse.hs
OSX.hs
PartialPrelude.hs
Path.hs Fix using lookupkey inside a subdirectory 2021-10-26 15:00:45 -04:00
Percentage.hs
PID.hs
Process.hs When bup split fails, display its stderr 2022-08-05 13:57:20 -04:00
QuickCheck.hs fix build warning 2021-01-13 14:48:41 -04:00
RawFilePath.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
ResourcePool.hs use ResourcePool for hash-object handles 2022-07-25 17:32:39 -04:00
Rsync.hs
SafeCommand.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
Scheduled.hs
Shell.hs add searchPathContents 2021-02-02 19:06:15 -04:00
ShellEscape.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
SimpleProtocol.hs minor improvements 2020-12-09 15:28:11 -04:00
Split.hs
SshConfig.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
SshHost.hs
Su.hs add searchPathContents 2021-02-02 19:06:15 -04:00
SystemDirectory.hs
Tense.hs
ThreadLock.hs
ThreadScheduler.hs avoid displaying the scanning annexed files message when repo is not large 2021-06-04 13:16:48 -04:00
TimeStamp.hs
TList.hs
Tmp.hs decorate openTempFile errors with the template name 2021-08-30 13:05:02 -04:00
Tor.hs add searchPathContents 2021-02-02 19:06:15 -04:00
Touch.hs fix build on windows 2020-11-16 09:31:45 -04:00
Tuple.hs
Url.hs use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink 2022-09-05 13:46:32 -04:00
UserInfo.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
Verifiable.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
WebApp.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
Yesod.hs