diff --git a/Utility/FileSystemEncoding.hs b/Utility/FileSystemEncoding.hs index b4497f30af..cf9355ccd5 100644 --- a/Utility/FileSystemEncoding.hs +++ b/Utility/FileSystemEncoding.hs @@ -157,10 +157,13 @@ truncateFilePath n = toRawFilePath . reverse . go [] n go coll cnt bs | cnt <= 0 = coll | otherwise = case S8.decode bs of - Just (c, x) | c /= S8.replacement_char -> - let x' = fromIntegral x - in if cnt - x' < 0 - then coll - else go (c:coll) (cnt - x') (S8.drop 1 bs) + Just (c, x) + | c /= S8.replacement_char -> + let x' = fromIntegral x + in if cnt - x' < 0 + then coll + else go (c:coll) (cnt - x') (S8.drop 1 bs) + | otherwise -> + go ('_':coll) (cnt - 1) (S8.drop 1 bs) _ -> coll #endif diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs index b9aff8979a..11ee051c96 100644 --- a/Utility/Tmp.hs +++ b/Utility/Tmp.hs @@ -6,6 +6,7 @@ -} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} module Utility.Tmp ( @@ -110,6 +111,7 @@ relatedTemplate :: RawFilePath -> Template relatedTemplate = toOsPath . relatedTemplate' relatedTemplate' :: RawFilePath -> RawFilePath +#ifndef mingw32_HOST_OS relatedTemplate' f | len > templateAddedLength = {- Some filesystems like FAT have issues with filenames @@ -121,6 +123,11 @@ relatedTemplate' f where len = B.length f dot = fromIntegral (ord '.') +#else +-- Avoids a test suite failure on windows, reason unknown, but +-- best to keep paths short on windows anyway. +relatedTemplate' _ = "t" +#endif {- When a Template is used to create a temporary file, some random bytes - are appended to it. This is how many such bytes can be added, maximum. diff --git a/doc/bugs/rsyncurl_without___34____58____34___creates_local_folder_as_remote/comment_2_1f74b0795eaba331f96f736d58536653._comment b/doc/bugs/rsyncurl_without___34____58____34___creates_local_folder_as_remote/comment_2_1f74b0795eaba331f96f736d58536653._comment new file mode 100644 index 0000000000..2f79d18637 --- /dev/null +++ b/doc/bugs/rsyncurl_without___34____58____34___creates_local_folder_as_remote/comment_2_1f74b0795eaba331f96f736d58536653._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="luciusf" + avatar="http://cdn.libravatar.org/avatar/b86fbf4daa865feb784bdc638e2236be" + subject="comment 2" + date="2025-01-30T19:17:58Z" + content=""" +Thank you for your reply. And I see what you mean, although personally it still feels more that a bug than a feature. Trying to be a good internet citizen I exhausted every documentation I could find about it, and it still took me way too long to figure out something that simple. Maybe the manpage could reflect this bit of information in more detail - let's see if I can figure out, how to contribute patches ... +"""]] diff --git a/doc/forum/__34__--fast__34___option_for_git_annex_get__63__/comment_2_c443d997a053927e77ce2607695e7311._comment b/doc/forum/__34__--fast__34___option_for_git_annex_get__63__/comment_2_c443d997a053927e77ce2607695e7311._comment new file mode 100644 index 0000000000..76a749dbfe --- /dev/null +++ b/doc/forum/__34__--fast__34___option_for_git_annex_get__63__/comment_2_c443d997a053927e77ce2607695e7311._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="jnkl" + avatar="http://cdn.libravatar.org/avatar/2ab576f3bf2e0d96b1ee935bb7f33dbe" + subject="comment 2" + date="2025-01-30T19:59:09Z" + content=""" +Thank you. The bash-tab-completion in Debian stable suggested it. +"""]]