wimh / SparkleShare

SparkleShare is a file sharing and collaboration tool inspired by Dropbox.
http://www.sparkleshare.org/
GNU General Public License v3.0
39 stars 6 forks source link

Crash on copying large directory to repo #25

Closed ghost closed 12 years ago

ghost commented 12 years ago

Test case:

Windows client, W7 32bit

  1. Connect to privately hosted GIT repo with private notification server
  2. Copy following directories to SparkleShare folder using Windows Explorer:
  3. TestCase1 (containing 500 text files)
    • subfolder1 (containing 500 text files)
    • subfolder2 (containing 500 text files)

      Consequence:

SparkleShare crash, exception IOException with following stack trace (sorry for german words, "bei" means at; rest should be self-explanatory)

Unhandled exeption: System.IO.IOException: Process cannot access "C:\Users\florian\Documents\SparkleShare\test\TestCase1" because it is used by another process. bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) bei System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption) bei System.IO.Directory.GetDirectories(String path) bei SparkleLib.SparkleRepoGit.FillEmptyDirectories(String path) bei SparkleLib.SparkleRepoGit.FillEmptyDirectories(String path) bei SparkleLib.SparkleRepoGit.get_AnyDifferences() bei SparkleLib.SparkleRepoBase.OnFileActivity(FileSystemEventArgs args) bei SparkleLib.SparkleRepoBase.b8(FileSystemEventArgs args) bei SparkleLib.SparkleWatcher.<.ctor>b1(Object o, FileSystemEventArgs args) bei System.IO.FileSystemWatcher.OnCreated(FileSystemEventArgs e) bei System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name) bei System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer) bei System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Somehow Windows Explorer seems to lock the TestCase1 folder while copying making it unwritable for other processes. For now, I just put a "try... catch" block at the affected code to continue testing, but a proper fix by someone who knows the code would be cool.

wimh commented 12 years ago

Closing all open issues - there are too many changes upstream, won't merge any more.