Permalink
Browse files

Fixed two porting issue (Create() -> Mkdirs() and ToString() -> Name).

Fixed two bugs I've introduced while porting previous jgit commits. :(
  • Loading branch information...
1 parent c658dfc commit 9cf586890e62e750b7a293e319421211f4fb0d9b @nulltoken nulltoken committed Oct 8, 2009
Showing with 6 additions and 6 deletions.
  1. +6 −6 Core/ObjectDirectory.cs
View
@@ -91,9 +91,9 @@ public override bool exists()
public override void create()
{
- _objects.Create();
- _infoDirectory.Create();
- _packDirectory.Create();
+ _objects.Mkdirs();
+ _infoDirectory.Mkdirs();
+ _packDirectory.Mkdirs();
}
public override void closeSelf()
@@ -113,7 +113,7 @@ public override void closeSelf()
/// <returns>Location of the object, if it were to exist as a loose object.</returns>
public FileInfo fileFor(AnyObjectId objectId)
{
- return fileFor(objectId.ToString());
+ return fileFor(objectId.Name);
}
private FileInfo fileFor(string objectName)
@@ -357,7 +357,7 @@ private PackList ScanPacks(PackList original)
private PackList ScanPacksImpl(PackList old)
{
Dictionary<string, PackFile> forReuse = ReuseMap(old);
- long lastRead = DateTime.Now.currentTimeMillis();
+ long lastRead = DateTime.Now.Ticks;
long lastModified = _packDirectory.LastWriteTime.Ticks;
HashSet<String> names = listPackDirectory();
var list = new List<PackFile>(names.Count >> 2);
@@ -451,7 +451,7 @@ private PackList ScanPacksImpl(PackList old)
private HashSet<string> listPackDirectory()
{
{
- var nameList = new List<string>(_packDirectory.GetFileSystemInfos().Select(x => x.FullName));
+ var nameList = new List<string>(_packDirectory.GetFileSystemInfos().Select(x => x.Name));
if (nameList.Count == 0)
return new HashSet<string>();
var nameSet = new HashSet<String>();

0 comments on commit 9cf5868

Please sign in to comment.