Use SparkleLib.IsRepo for folder checking
This commit is contained in:
parent
e8ae8198ff
commit
c000f8cb0c
|
@ -1153,6 +1153,13 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
|
||||
public static bool IsRepo (string path) {
|
||||
|
||||
return System.IO.Directory.Exists (Path.Combine (path, ".git"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Disposes all resourses of this object
|
||||
new public void Dispose ()
|
||||
{
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace SparkleShare {
|
|||
if (OnInvitation != null)
|
||||
OnInvitation (server, folder, token);
|
||||
|
||||
} else if (Directory.Exists (Path.Combine (args.FullPath, ".git"))) {
|
||||
} else if (SparkleRepo.IsRepo (args.FullPath)) {
|
||||
|
||||
AddRepository (args.FullPath);
|
||||
|
||||
|
@ -509,7 +509,7 @@ namespace SparkleShare {
|
|||
{
|
||||
|
||||
// Check if the folder is a Git repository
|
||||
if (!Directory.Exists (SparkleHelpers.CombineMore (folder_path, ".git")))
|
||||
if (!SparkleRepo.IsRepo (folder_path))
|
||||
return;
|
||||
|
||||
SparkleRepo repo = new SparkleRepo (folder_path);
|
||||
|
|
Loading…
Reference in a new issue