Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using 64-bit TortoiseSVN on a 64-bit Windows 7 Professional. Every so often a checkout or update will fail with an error message like the following.

Error: Can't move 
Error: '[...]\\.svn\tmp\entries' 
Error: to 
Error: '[...]\\.svn\entries': 
Error: The file or directory is corrupted and unreadable. 

Then CHKDSK runs after reboot, which makes me nervous.

Why might this be happening or how I can avoid it?

share|improve this question
    
What is your output from the CHKDSK? You may have a more serious problem at hand. –  user3914 Oct 8 '09 at 14:57
    
How'd you even get it to install? It crashes and burns during install for me. :-( –  Brian Knoblauch Oct 8 '09 at 15:29
    
I'm also experiencing this issue -- my virus scanner is McAfee VirusScan Enterprise 8.7.0i. Interestingly, it does not seem to depend on the exact brand of virus scanner: On the web, similar error reports can be found for users with Microsoft Security Essentials and [Kaspersky][2]. [2]: forum.kaspersky.com/… –  Heinzi Nov 2 '09 at 18:13
    
Blech, I have the same problem, and excluding the svn + TortoiseSVN processes and the svn work dir don't help. If I don't turn off real-time monitoring completely, I keep getting corrupted .svn directories. Sucks. –  orip Dec 6 '09 at 16:44
1  
All the developers in our shop running Win 7 64 bit are having the same problem. –  Chasler Dec 9 '09 at 0:59

14 Answers 14

up vote 51 down vote accepted

This is a known bug in Window 7, slated to be fixed in SP 1:

http://subversion.wandisco.com/blogs/windows-7-bogus-errorfilecorrupt-error-.html

There is now a hotfix available:

http://support.microsoft.com/kb/982927/en-us
http://support.microsoft.com/kb/2498472/en-us

share|improve this answer
    
I was experiencing the same problem and tried installing the HotFix. It did not solve my problem. Disabling my Anti-Virus software, however, DID solve the problem. –  Brian Lacy Oct 25 '10 at 20:07
    
+1. Hotfix solved issue for me - disabling AV beforehand had not solved the issue. –  Joshua McKinnon Oct 27 '10 at 22:46
1  
Apparently the link to the hotfix is broken.... –  Frank V Mar 7 '11 at 19:55
1  
... and it doesn't seem to be fixed for me in SP1. Anyone heard of an update on this? –  James Crowley Mar 24 '11 at 23:45
    
For some reason they changed the KB number. I updated the OP's answer to reflect the new location. –  SiegeX Apr 11 '11 at 23:40

I had the same problem (using MS Security Essentials). I 'think' it might have something to do with the AV programs monitoring program activity. It seems like that MS SE 'thinks' a malicious script is running and it stops it.

I tried disabling 'Monitor file and program activity on your computer' in 'Real-time protection' and it seemed to solve the problem.

From there, I did some other testing and found that I could leave the option on and still have successful checkouts by configuring 'Excluded Processes' to include "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" "C:\Program Files\TortoiseSVN\bin\TSVNCache.exe"

Either method seems to have worked for me so far. (I've been able to do large check-outs consistently since I've changed the options.) I prefer the 2nd, so that MS SE still monitors for potential malicious activity anyway.

share|improve this answer
    
No, see tinyurl.com/w7corrupt –  Matt McHenry Feb 11 '10 at 13:38
    
Thanks a lot. I have Kaspersky Internet Security in Windows XP, your solution worked for me too. –  samir105 Dec 2 '11 at 6:32

It's all the doing of the Windows Indexing Service. See SVN: TortoiseSVN Can’t Move .. The file or directory is corrupted and unreadable (Windows 7).

share|improve this answer
    
I'd removed the AV real time protection, but still got it occasionally. This helped. –  orip Feb 1 '10 at 16:16
    
Yes. Also see Cragly's answer for the concise step-by-step fix. –  Christopher Bruns Feb 13 '11 at 15:45

I had the same problem, but with 32-bit TortoiseSVN (1.6.6 on Win7 x64).

Disabling/changing antivirus did not help. Neither did downgrading to TortoiseSVN 1.5.10 (that only had the consequence of not being able to read the checked out repository directories any more.

What helped was configuring the Windows Indexing Service to not index my SVN/source code directories. I found that tip here: http://schleichermann.wordpress.com/2009/12/09/svn-tortoisesvn-cant-move-the-file-or-directory-is-corrupted-and-unreadable-windows-7/

share|improve this answer
    
I tried disabling my Kaspersky but it didn't help. However disabling Indexing service for my Working copy fixed the issue –  Khash Jan 3 '10 at 15:45

Here is a solution I found to solve the problem which worked like a treat. It's an excerpt from SVN: TortoiseSVN Can’t Move .. The file or directory is corrupted and unreadable (Windows 7).

  1. Click the start menu button, then click in the text box to begin a search.
  2. Type in “windows index”
  3. Click on “Indexing Options” that should come up in the search (this can also be found in the Control Panel, if you change the View by to Large or Small icons. I am not sure what it’s categorized under, though)
  4. When the Indexing Options box comes up, click on the Modify button. This will pop up an Indexed Locations dialog, where you should see a list of some “locations”, with your hard drive(s) being in the list.
  5. Expand the desired hard drive, down to the root folder of the files you’re using SVN with, and make sure the box is unchecked. It was checked for me here, even though the folder option was as I described in my last post. Also note that the hard drive will most likely be collapsed, and will have its box unchecked, even though once you expand it, you may find checked boxes.

For example, my projects are located in my C:\Users\Name\Documents\VS2008\Projects\ folder and each of the folders in here were checked in the Indexed Locations dialog. After unchecking the appropriate folders here, which is where my working copy of SVN’d projects are, everything seems to be working the way I expect it to.

I hope this helps someone still suffering from this crippling problem.

share|improve this answer

The article "Getting ERROR_FILE_CORRUPT when moving a file... Result: Chkdsk at reboot (Reproducable and confirmed)" explains why it is happening, and the example program therein shows exactly how you can get this error on Windows 7. I just hope Microsoft finds a way to resolve this issue.

[Update] This issue has been fixed in ServicePack 1 for Windows 7 and ServicePack 1 for Windows Server 2008R2.

share|improve this answer

This is problem 'The file or directory is corrupted and unreadable.' is coming in Windows 7 or Vista because YOU HAVE TURNED ON THE INDEXING SERVICE.

To get solved either Turn of the indexing service for your svn directory or its parent directory or Temporarily turn off the indexing: Here's HOW? 1)Go to Control Panel - Indexing Options 2) Click On Pause. This will pause indexing for next 15 minutes by default. 3) Now Perform Commit. You are aloud to commit for next 15 mins

share|improve this answer
    
The indexing server doesn't cause the problem. Any application monitoring directories for changes may cause this problem. –  Bert Huijben Sep 13 '11 at 10:16

We were experiencing the same issue. If you have a virus scanner installed, it appears that it could be causing the problem. Try to disable scanning before a large checkout.

http://groups.google.com/group/tortoisesvn/browse%5Fthread/thread/4d8bdcea4fd14fce?pli=1

For us, we were only experiencing the issue with very large updates/checkouts. Average or small updates were working flawlessly. I don't know why that's the case, but I can totally see a virus-scanner-related issue being inconsistent in such a manner.

share|improve this answer
    
Might well be. I experience the issue via TortoiseSVN and command-line SVN. Also, I have experienced it on small commits and updates as well as larger ones. Funny thing is that often, after hitting this error, I can repeat the exact same operation and that time it will complete without issue. –  David Alpert Oct 29 '09 at 20:10

I have the same issue with McAfee 8.7i. To workaround it, i've to disable Access Protection as i can't seem to figure how to add an exception for TortoiseSVN.

share|improve this answer

I was getting the exact same error, but also another error when Updating ("Cannot find the file specified").

I am running Windows 7 x64 and have McAfee installed.

I had renamed a file from "Map" to "map" and committed it. The commit worked fine but Checking Out failed with the "directory is corrupt" error.

In my case it was fixed by going into Repo-Browser and deleting the file "map". So I still had the original un-renamed file ("Map") in version control. From then the checkout worked fine.

share|improve this answer

I was running Panda Cloud Anti-Virus and received this error -- as noted above, when disabled, the error went away completely.

share|improve this answer

Not sure if you're still having this issue, but I found a solution that wasn't coming up in my Google searches for me. I posted specific directions here on my blog. Hope this helps.

share|improve this answer

I have a directory - C:\Users\\workspace\ - where I checkout projects.

What I have found is that if I go to the indexing options in Windows 7, and click 'Modify', a new popup appears. From this popup I can see my C drive with and expand and collapse arrow. I have simply unchecked my workspace directory. Presumably this should disable indexing on this directory.

I am still getting the errors, but I thought this might be a helpful piece of info towards the solution. NB I get the errors with indexing paused anyway, so there may be another factor.

share|improve this answer
    
I eventually fixed my problem. This approach seems to have helped, but what I found is that I got fewer errors when I committed single module directories (I was committing Drupal modules in my project). There were a few outliers which simply refused to commit. My approach here was to export these module directories out of the project SVN (i.e. the checked-out project), delete the directories out of the project, committing, and then copying the exported modules back in and committing again. This stopped the errors, although my version history was lost/broken as a result. –  Aaron Newton Jun 5 '10 at 15:07

You can recover from this problem using "cleanup" in Tortoise SVN. Find the directory(ies) that are giving you problems and descend into them. You will see files badged as unversioned. If you run the cleanup command on the containing directory, it will temporarily fix the problem.

I'm also going to turn off the indexing mishegas, toute-suite. Thanks for that!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.