Skip to content

Commit

Permalink
Handle folder created adding to included folder for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Willford committed Aug 5, 2019
1 parent 57de5e9 commit 2f348d3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions GVFS/GVFS.Platform.Mac/MacFileSystemVirtualizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ private void OnNewFileCreated(string relativePath, bool isDirectory)
}
else
{
this.FileSystemCallbacks.OnFolderCreated(relativePath);
if (this.FileSystemCallbacks.OnFolderCreated(relativePath))
{
this.OnEnumerateDirectory(0, relativePath, -1, $"{nameof(this.OnNewFileCreated)}_FolderIncluded");
}
}
}
else
Expand Down Expand Up @@ -623,10 +626,18 @@ private Result CreatePlaceholders(string directoryRelativePath, IEnumerable<Proj
metadata.Add("fileInfo.Name", fileInfo.Name);
metadata.Add("fileInfo.Size", fileInfo.Size);
metadata.Add("fileInfo.IsFolder", fileInfo.IsFolder);
metadata.Add(nameof(result), result.ToString());
metadata.Add(nameof(sha), sha);
this.Context.Tracer.RelatedError(metadata, $"{nameof(this.CreatePlaceholders)}: Write placeholder failed");

return result;
if (result == Result.EIOError)
{
this.FileSystemCallbacks.OnFileConvertedToFull(childRelativePath);
}
else
{
return result;
}
}
else
{
Expand Down

0 comments on commit 2f348d3

Please sign in to comment.