From 72e8c691dae165dce6765e3d71515f3cde512460 Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Fri, 23 Aug 2013 18:09:27 +0000 Subject: [PATCH 01/12] Added a comment --- ..._16230fbbb996e165b84787ed4d5f72ea._comment | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/bugs/Unable_to_import_feed/comment_1_16230fbbb996e165b84787ed4d5f72ea._comment diff --git a/doc/bugs/Unable_to_import_feed/comment_1_16230fbbb996e165b84787ed4d5f72ea._comment b/doc/bugs/Unable_to_import_feed/comment_1_16230fbbb996e165b84787ed4d5f72ea._comment new file mode 100644 index 0000000000..7c9c1e129b --- /dev/null +++ b/doc/bugs/Unable_to_import_feed/comment_1_16230fbbb996e165b84787ed4d5f72ea._comment @@ -0,0 +1,45 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="4.154.0.63" + subject="comment 1" + date="2013-08-23T18:09:27Z" + content=""" +When I try this, without the German translation, I get: + +
+joey@gnu:~/tmp/newrepo>git annex importfeed 'http://www.ndr.de/fernsehen/sendungen/extra_3/videos/zum_mitnehmen/extradrei196_version-hq.xml'
+(checking known urls...)
+importfeed http://www.ndr.de/fernsehen/sendungen/extra_3/videos/zum_mitnehmen/extradrei196_version-hq.xml 
+--2013-08-23 13:58:19--  http://www.ndr.de/fernsehen/sendungen/extra_3/videos/zum_mitnehmen/extradrei196_version-hq.xml
+Resolving www.ndr.de (www.ndr.de)... 23.73.180.154, 23.73.180.115
+Connecting to www.ndr.de (www.ndr.de)|23.73.180.154|:80... connected.
+HTTP request sent, awaiting response... 200 OK
+Length: 61865 (60K) [application/xml]
+Saving to: ‘/home/joey/tmp/feed31120’
+
+100%[======================================>] 61,865       151KB/s   in 0.4s   
+
+2013-08-23 13:58:25 (151 KB/s) - ‘/home/joey/tmp/feed31120’ saved [61865/61865]
+
+
+  warning: bad feed content
+
+ +It seems you left out the last line of the error. + +The feed library seems to fail to find any of the enclosures in this feed, although it is able to parse it as far as finding the individual items in the feed: + +
+Prelude Text.Feed.Query Text.Feed.Import> f <- parseFeedFromFile \"extradrei196_version-hq.xml\" 
+Prelude Text.Feed.Query Text.Feed.Import> map getItemEnclosure $ feedItems f
+[Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing]
+
+ +The feed *appears* to contain enclosures, for example: + +
+
+
+ +It may not be well-formed, or the feed library may have a bug. Assuming the latter, I have filed a bug report on the feed library: https://github.com/sof/feed/issues/3 +"""]] From 0379085032ff59d3891f1078ee0f690cec0fd536 Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Fri, 23 Aug 2013 18:23:52 +0000 Subject: [PATCH 02/12] Added a comment --- ...t_2_ee3ecc86990ac5a8d0c4fdfb482a7594._comment | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/forum/correct_way_to_add_two_preexisting_datasets/comment_2_ee3ecc86990ac5a8d0c4fdfb482a7594._comment diff --git a/doc/forum/correct_way_to_add_two_preexisting_datasets/comment_2_ee3ecc86990ac5a8d0c4fdfb482a7594._comment b/doc/forum/correct_way_to_add_two_preexisting_datasets/comment_2_ee3ecc86990ac5a8d0c4fdfb482a7594._comment new file mode 100644 index 0000000000..d1e259afd9 --- /dev/null +++ b/doc/forum/correct_way_to_add_two_preexisting_datasets/comment_2_ee3ecc86990ac5a8d0c4fdfb482a7594._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="4.154.0.63" + subject="comment 2" + date="2013-08-23T18:23:52Z" + content=""" +If you need to preserve mtimes, or differentiate between files with identical content but different mtimes, neither git nor git-annex is going to do what you want, since git doesn't care about preserving much file metadata. + +As far as importing two sets of files on two computers, the best thing to do is import each, and then let the two sync up. Otherwise, when you're running the assistant it will start downloading the first set you import to the second computer, before the second set is added there, and do extra work. Although once the duplicate files from the second set land in the second git repository, the assistant will avoid any additional redundant transfers. + +(The assistant never *moves* files, if both repositories are configured to be in the default client repository group. It only copies.) + +I don't understand question #1. \"set2 ended with a lot of symlinks but only in one subfolder\" doesn't make sense to me, or rather I could interpret it to mean any of dozen things (none of which seem likely) + +You can `git annex drop` files in direct mode. However, if you're running the assistant, it will try to get them back. You can configure your repository to be in manual mode to prevent the assistant doing that, or not use the assistant, or configure a [[preferred_content]] expression to make the assistant do something more custom like not try to get files located in a \"olddata\" directory. +"""]] From d7bed01f04908d8a1b784c6083e7c89afa3203c1 Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Fri, 23 Aug 2013 18:30:05 +0000 Subject: [PATCH 03/12] Added a comment --- ...t_7_b3929281dff6078d77f1b9ae42e25bb6._comment | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/forum/Poor_man__39__s_IMAP/comment_7_b3929281dff6078d77f1b9ae42e25bb6._comment diff --git a/doc/forum/Poor_man__39__s_IMAP/comment_7_b3929281dff6078d77f1b9ae42e25bb6._comment b/doc/forum/Poor_man__39__s_IMAP/comment_7_b3929281dff6078d77f1b9ae42e25bb6._comment new file mode 100644 index 0000000000..aba4cd0de9 --- /dev/null +++ b/doc/forum/Poor_man__39__s_IMAP/comment_7_b3929281dff6078d77f1b9ae42e25bb6._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="4.154.0.63" + subject="comment 7" + date="2013-08-23T18:30:04Z" + content=""" +I don't feel that git-annex is the best thing to use for this. Maildir has some specific semantics for the filenames used in it that let imap clients resolve inconsistencies, such as a message that was read on machine A, and deleted on machine B. git-annex is unlikely to work as well. + +However, I have to say that the very beginning of this thread has a wrong statement in it. + +> I tried setting it up with the webUI to the assistant but it only offers encrypted storage[1] on the remote server. + +If you install git and git-annex on your remote server, the git-annex assistant will detect this, and offer the choice between a regular git repository, and encrypted storage. If you don't have them installed, it tells you you don't, offers to let you retry once you do install them, and offers encrypted storage as the only option that works given what's installed on the server. + +(Also, the bug you linked to in [1] has nothing at all to do with what you were talking about.) +"""]] From b37e3cdca26f6676d17df71b3cef2502c5e68a4f Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Fri, 23 Aug 2013 18:35:01 +0000 Subject: [PATCH 04/12] Added a comment --- ...ment_2_af2a2634d8d128868022d033d6adb549._comment | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_2_af2a2634d8d128868022d033d6adb549._comment diff --git a/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_2_af2a2634d8d128868022d033d6adb549._comment b/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_2_af2a2634d8d128868022d033d6adb549._comment new file mode 100644 index 0000000000..0623ed1dbb --- /dev/null +++ b/doc/forum/Can__39__t_get_git-annex_merge_to_work_from_git_hook/comment_2_af2a2634d8d128868022d033d6adb549._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="4.154.0.63" + subject="comment 2" + date="2013-08-23T18:35:01Z" + content=""" +Having just set up which uses a git hook to run `git annex merge`, I can say that the main problems you are likely to run into are: + +1. The hook might be run with the cwd not set to the top of the git repository. cd to the git repository in the hook to fix. +2. The hook might be run with `GIT_DIR` set to a strange value (in my case, it was set to \".\"), which is not the actual .git directory location. Unsetting it fixes that. + +I don't know about how to get git hooks to work on FAT filesystems though. Hooks have to be executable, and most systems probably don't mount such filesystems with executability allowed. +"""]] From f1b14ef0ac2555aa3b356390b84f8cd559680e37 Mon Sep 17 00:00:00 2001 From: RaspberryPie Date: Fri, 23 Aug 2013 18:51:51 +0000 Subject: [PATCH 05/12] Added a comment --- ...omment_17_2a9d6807a3a13815c824985521757167._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/install/cabal/comment_17_2a9d6807a3a13815c824985521757167._comment diff --git a/doc/install/cabal/comment_17_2a9d6807a3a13815c824985521757167._comment b/doc/install/cabal/comment_17_2a9d6807a3a13815c824985521757167._comment new file mode 100644 index 0000000000..c0b570dfb6 --- /dev/null +++ b/doc/install/cabal/comment_17_2a9d6807a3a13815c824985521757167._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="RaspberryPie" + ip="77.247.181.162" + subject="comment 17" + date="2013-08-23T18:51:51Z" + content=""" +Thanks for the quick answer. I will try to build git-annex with just the assistant, as you suggest, and once it works set up the server by hand as you suggest. + +BTW: Awesome job you're doing with git-annex. I appreciate your enthusiasm. +"""]] From 57a0929a61e7540e2c416e597a4e941e881e5ea2 Mon Sep 17 00:00:00 2001 From: "http://olivier.berger.myopenid.com/" Date: Fri, 23 Aug 2013 19:59:35 +0000 Subject: [PATCH 06/12] Added a comment: Git annex copy needed before git annex sync --- ...omment_14_ff4ffc2aabc5fd174d7386ef13860f78._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/direct_mode/comment_14_ff4ffc2aabc5fd174d7386ef13860f78._comment diff --git a/doc/direct_mode/comment_14_ff4ffc2aabc5fd174d7386ef13860f78._comment b/doc/direct_mode/comment_14_ff4ffc2aabc5fd174d7386ef13860f78._comment new file mode 100644 index 0000000000..3a538e00b3 --- /dev/null +++ b/doc/direct_mode/comment_14_ff4ffc2aabc5fd174d7386ef13860f78._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://olivier.berger.myopenid.com/" + nickname="obergix" + subject="Git annex copy needed before git annex sync" + date="2013-08-23T19:59:35Z" + content=""" +Thanks for these details @joeyh. But AFAIU, one needs to proceed to the git annex copy before doing the git annex sync, otherwise, symlinks (or files containing the symlink path on SMB) will be created, instead of the plain \"direct\" files that are expected. + +I'm still not sure whether the git annex sync needs to be issued on either of the indirect or direct remotes first, or both, then in which sequence. I think a \"walkthrough\" script would help. +"""]] From 9f16caec3fe64ee39450d95368a485fc02d34735 Mon Sep 17 00:00:00 2001 From: "http://olivier.berger.myopenid.com/" Date: Fri, 23 Aug 2013 20:28:53 +0000 Subject: [PATCH 07/12] Added a comment: So it seems I have found a sequence that seems to be operating fine --- ..._eb7d13f6b6fa674a2536bde51bfc3fd1._comment | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 doc/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_5_eb7d13f6b6fa674a2536bde51bfc3fd1._comment diff --git a/doc/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_5_eb7d13f6b6fa674a2536bde51bfc3fd1._comment b/doc/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_5_eb7d13f6b6fa674a2536bde51bfc3fd1._comment new file mode 100644 index 0000000000..e014efb86c --- /dev/null +++ b/doc/forum/Using_git_annex_with_a_SMB__47__FTP_TV_NAS_with_preconfigured_dirs/comment_5_eb7d13f6b6fa674a2536bde51bfc3fd1._comment @@ -0,0 +1,48 @@ +[[!comment format=mdwn + username="http://olivier.berger.myopenid.com/" + nickname="obergix" + subject="So it seems I have found a sequence that seems to be operating fine" + date="2013-08-23T20:28:45Z" + content=""" +Here's a script, which I think makes it work, using git clone, git annex copy and git annex sync : + # The \"master\" remote which is with default indirect mode, on a Linux FS + BASE1=~/tmp + REPO1=$BASE1/annex-test + + # The \"slave\" remote on the NAS (a Samba server), which has been mounted with cifs, and thus will be in direct mode + BASE2=/mnt/freebox-server/ + REPO2=$BASE2/annex-test + + cd $BASE1 + mkdir $REPO1 + cd $REPO1 + git init + git annex init \"my laptop\" + + cd $REPO1 + cp -Lr ~/some_large_files ./ + git annex add some_large_files + git commit -m \"added\" + + cd $BASE2 + git clone $REPO1 $REPO2 + cd $REPO2 + + git annex init \"freebox server\" + # This is not really needed, but if you want to replicate on a non cifs mount + git annex direct + + cd $REPO1 + git remote add freebox-server $REPO2 + + git annex copy --to freebox-server + git annex sync + + cd $REPO2 + git remote add laptop $REPO1 + #git annex sync + +After this, you should have your .git and plain \"direct\" files on the NAS, mirrored from what's on the laptop. + +Hope this helps. +"""]] From 4094d384c1e410a422a259a0eff7cd05e23fa35c Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/2grhJvAC049fJnvALDXek.6MRZMTlg--#eec89" Date: Sat, 24 Aug 2013 04:57:00 +0000 Subject: [PATCH 08/12] --- .../Problem_when_dropping_unused_files.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/bugs/Problem_when_dropping_unused_files.mdwn diff --git a/doc/bugs/Problem_when_dropping_unused_files.mdwn b/doc/bugs/Problem_when_dropping_unused_files.mdwn new file mode 100644 index 0000000000..853ab3c3c5 --- /dev/null +++ b/doc/bugs/Problem_when_dropping_unused_files.mdwn @@ -0,0 +1,17 @@ +### Please describe the problem. + +While dropping 19 unused files from an annex, I got this error: + + error: invalid object 100644 c873416e78db4dd94b6ab40470d6fe99b2ecb8bd for '002/0a6/SHA256E-s427690--03aeabcde841b66168b72de80098d74e047f3ffc832d4bbefa1f2f70ee6c92f8.jpg.log' + fatal: git-write-tree: error building trees + git-annex: failed to read sha from git write-tree + +I've actually seen this before, a few months ago. + +### What steps will reproduce the problem? + +I have no idea, but once it happens I can't interact with unused files anymore. Also, `git annex fsck` now reports this same problem as well. + +### What version of git-annex are you using? On what operating system? + +git-annex version: 4.20130815, OS X 10.8.4 From 9ed11ecb884fc5c57c341b268fcea15ebeae738e Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/2grhJvAC049fJnvALDXek.6MRZMTlg--#eec89" Date: Sat, 24 Aug 2013 04:57:18 +0000 Subject: [PATCH 09/12] --- .../Problem_when_dropping_unused_files.mdwn | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/bugs/Problem_when_dropping_unused_files.mdwn b/doc/bugs/Problem_when_dropping_unused_files.mdwn index 853ab3c3c5..45e0ddf504 100644 --- a/doc/bugs/Problem_when_dropping_unused_files.mdwn +++ b/doc/bugs/Problem_when_dropping_unused_files.mdwn @@ -15,3 +15,23 @@ I have no idea, but once it happens I can't interact with unused files anymore. ### What version of git-annex are you using? On what operating system? git-annex version: 4.20130815, OS X 10.8.4 + + + +### Please describe the problem. + +While dropping 19 unused files from an annex, I got this error: + + error: invalid object 100644 c873416e78db4dd94b6ab40470d6fe99b2ecb8bd for '002/0a6/SHA256E-s427690--03aeabcde841b66168b72de80098d74e047f3ffc832d4bbefa1f2f70ee6c92f8.jpg.log' + fatal: git-write-tree: error building trees + git-annex: failed to read sha from git write-tree + +I've actually seen this before, a few months ago. + +### What steps will reproduce the problem? + +I have no idea, but once it happens I can't interact with unused files anymore. Also, `git annex fsck` now reports this same problem as well. + +### What version of git-annex are you using? On what operating system? + +git-annex version: 4.20130815, OS X 10.8.4 From bd3dbba13062dea30ae9b8590146c2db8afa5fb8 Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/2grhJvAC049fJnvALDXek.6MRZMTlg--#eec89" Date: Sat, 24 Aug 2013 04:57:40 +0000 Subject: [PATCH 10/12] --- .../Problem_when_dropping_unused_files.mdwn | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/doc/bugs/Problem_when_dropping_unused_files.mdwn b/doc/bugs/Problem_when_dropping_unused_files.mdwn index 45e0ddf504..853ab3c3c5 100644 --- a/doc/bugs/Problem_when_dropping_unused_files.mdwn +++ b/doc/bugs/Problem_when_dropping_unused_files.mdwn @@ -15,23 +15,3 @@ I have no idea, but once it happens I can't interact with unused files anymore. ### What version of git-annex are you using? On what operating system? git-annex version: 4.20130815, OS X 10.8.4 - - - -### Please describe the problem. - -While dropping 19 unused files from an annex, I got this error: - - error: invalid object 100644 c873416e78db4dd94b6ab40470d6fe99b2ecb8bd for '002/0a6/SHA256E-s427690--03aeabcde841b66168b72de80098d74e047f3ffc832d4bbefa1f2f70ee6c92f8.jpg.log' - fatal: git-write-tree: error building trees - git-annex: failed to read sha from git write-tree - -I've actually seen this before, a few months ago. - -### What steps will reproduce the problem? - -I have no idea, but once it happens I can't interact with unused files anymore. Also, `git annex fsck` now reports this same problem as well. - -### What version of git-annex are you using? On what operating system? - -git-annex version: 4.20130815, OS X 10.8.4 From 191637adca8ff514010b07d2a20c89365a831be1 Mon Sep 17 00:00:00 2001 From: "https://me.yahoo.com/a/2grhJvAC049fJnvALDXek.6MRZMTlg--#eec89" Date: Sat, 24 Aug 2013 05:01:37 +0000 Subject: [PATCH 11/12] Added a comment --- ...comment_1_e1a99bd3eb8b3186653b52a52b1836de._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/bugs/Problem_when_dropping_unused_files/comment_1_e1a99bd3eb8b3186653b52a52b1836de._comment diff --git a/doc/bugs/Problem_when_dropping_unused_files/comment_1_e1a99bd3eb8b3186653b52a52b1836de._comment b/doc/bugs/Problem_when_dropping_unused_files/comment_1_e1a99bd3eb8b3186653b52a52b1836de._comment new file mode 100644 index 0000000000..0e39a96fcc --- /dev/null +++ b/doc/bugs/Problem_when_dropping_unused_files/comment_1_e1a99bd3eb8b3186653b52a52b1836de._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="https://me.yahoo.com/a/2grhJvAC049fJnvALDXek.6MRZMTlg--#eec89" + nickname="John" + subject="comment 1" + date="2013-08-24T05:01:37Z" + content=""" +The following command restored some sanity: + + find .git/annex/ -name '*.log' -delete +"""]] From 7d1ba504b1a1ab79fd405f250312352acc96ea22 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Sat, 24 Aug 2013 10:58:54 +0200 Subject: [PATCH 12/12] windows: MissingH-1.2.0.2 has been released and it no longer needs patching Signed-off-by: Yury V. Zaytsev --- standalone/windows/build.sh | 9 +-- ...967426a14eb7e8978277ed4fa937f8e0c514.patch | 75 ------------------- 2 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh index 670b418d00..c61063adee 100644 --- a/standalone/windows/build.sh +++ b/standalone/windows/build.sh @@ -26,14 +26,7 @@ rm -f git-annex-installer.exe # for haskell libraries to link them with the cygwin library. cabal update || true -MISSINGH_VERSION="1.2.0.1" - -rm -rf MissingH-${MISSINGH_VERSION} -cabal unpack MissingH -cd MissingH-${MISSINGH_VERSION} -withcyg patch -p1 <../standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch -cabal install || true -cd .. +cabal install MissingH cabal install --only-dependencies -f"$FLAGS" diff --git a/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch b/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch deleted file mode 100644 index 02b6bd63d3..0000000000 --- a/standalone/windows/haskell-patches/ccc5967426a14eb7e8978277ed4fa937f8e0c514.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 017b26c0198d6982e47600b66235d01990e49fef Mon Sep 17 00:00:00 2001 -From: mvoidex -Date: Fri, 18 Jan 2013 15:22:03 +0400 -Subject: [PATCH 1/2] Fixed error (getModificationTime returns UTCTime, not - ClockTime) - ---- - src/System/IO/WindowsCompat.hs | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs -index d910dca..38820bb 100644 ---- a/src/System/IO/WindowsCompat.hs -+++ b/src/System/IO/WindowsCompat.hs -@@ -56,6 +56,8 @@ import System.IO.StatCompat - import System.Posix.Consts - import System.Time.Utils - import System.Directory -+import Data.Time -+import Data.Time.Clock.POSIX - - -- these types aren't defined here - -@@ -112,6 +114,9 @@ otherModes = 0o00007 - accessModes :: FileMode - accessModes = ownerModes .|. groupModes .|. otherModes - -+utcTimeToSeconds :: Num a => UTCTime -> a -+utcTimeToSeconds = fromInteger . floor . utcTimeToPOSIXSeconds -+ - ----------- stat - type FileStatus = FileStatusCompat - getFileStatus :: FilePath -> IO FileStatus -@@ -120,7 +125,7 @@ getFileStatus fp = - isdir <- doesDirectoryExist fp - perms <- getPermissions fp - modct <- getModificationTime fp -- let epochtime = clockTimeToEpoch modct -+ let epochtime = utcTimeToSeconds modct - return $ FileStatusCompat {deviceID = -1, - fileID = -1, - fileMode = if isfile then regularFileMode --- -1.8.1.6 - - -From 6991e46b613fd929fd8e9bc49ae13c003a3b740c Mon Sep 17 00:00:00 2001 -From: Hamish Mackenzie -Date: Sun, 12 May 2013 18:08:16 +1200 -Subject: [PATCH 2/2] Fix for older versions of directory (where - getModificationTime still returns ClockTime) - ---- - src/System/IO/WindowsCompat.hs | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs -index 38820bb..8f7b476 100644 ---- a/src/System/IO/WindowsCompat.hs -+++ b/src/System/IO/WindowsCompat.hs -@@ -125,7 +125,11 @@ getFileStatus fp = - isdir <- doesDirectoryExist fp - perms <- getPermissions fp - modct <- getModificationTime fp -+#if MIN_VERSION_directory(1,2,0) - let epochtime = utcTimeToSeconds modct -+#else -+ let epochtime = clockTimeToEpoch modct -+#endif - return $ FileStatusCompat {deviceID = -1, - fileID = -1, - fileMode = if isfile then regularFileMode --- -1.8.1.6 -