Windows: Support long filenames in more (possibly all) of the code
authorJoey Hess <joeyh@joeyh.name>
Wed, 1 Mar 2023 19:55:58 +0000 (15:55 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 1 Mar 2023 19:55:58 +0000 (15:55 -0400)
commit54ad1b4cfb1c8302f1b862cb2699ab9351e3eb5b
treef5ba286542c39562f2266113f1c56804d5ab73aa
parent505f1a654bfaa0095278238c7ca976762b931471
Windows: Support long filenames in more (possibly all) of the code

Works around this bug in unix-compat:
https://github.com/jacobstanley/unix-compat/issues/56
getFileStatus and other FilePath using functions in unix-compat do not do
UNC conversion on Windows.

Made Utility.RawFilePath use convertToWindowsNativeNamespace to do the
necessary conversion on windows to support long filenames.

Audited all imports of System.PosixCompat.Files to make sure that no
functions that operate on FilePath were imported from it. Instead, use
the equvilants from Utility.RawFilePath. In particular the
re-export of that module in Common had to be removed, which led to lots
of other changes throughout the code.

The changes to Build.Configure, Build.DesktopFile, and Build.TestConfig
make Utility.Directory not be needed to build setup. And so let it use
Utility.RawFilePath, which depends on unix, which cannot be in
setup-depends.

Sponsored-by: Dartmouth College's Datalad project
57 files changed:
Annex/AutoMerge.hs
Annex/Content.hs
Annex/Content/LowLevel.hs
Annex/Content/PointerFile.hs
Annex/CopyFile.hs
Annex/Ingest.hs
Annex/Init.hs
Annex/Link.hs
Annex/Perms.hs
Annex/Tmp.hs
Assistant/Install.hs
Assistant/Threads/Committer.hs
Assistant/Threads/SanityChecker.hs
Assistant/Threads/Watcher.hs
Assistant/Upgrade.hs
Assistant/WebApp/Configurators/Local.hs
Backend/WORM.hs
Build/Configure.hs
Build/DesktopFile.hs
Build/TestConfig.hs
CHANGELOG
CmdLine/Seek.hs
Command/Add.hs
Command/Fix.hs
Command/Fsck.hs
Command/FuzzTest.hs
Command/Import.hs
Command/ImportFeed.hs
Command/Info.hs
Command/Lock.hs
Command/ReKey.hs
Command/Unannex.hs
Command/Uninit.hs
Command/Unlock.hs
Common.hs
Git/Hook.hs
Limit.hs
P2P/Address.hs
P2P/IO.hs
Remote/Ddar.hs
Remote/Directory.hs
Remote/Git.hs
Remote/Helper/Git.hs
Test.hs
Test/Framework.hs
Upgrade/V0.hs
Upgrade/V1.hs
Upgrade/V7.hs
Utility/DirWatcher/INotify.hs
Utility/DirWatcher/Win32Notify.hs
Utility/Directory.hs
Utility/InodeCache.hs
Utility/QuickCheck.hs
Utility/RawFilePath.hs
Utility/SshConfig.hs
Utility/Tmp.hs
Utility/Tor.hs