controller: Remove redundant method
This commit is contained in:
parent
ea0e6c1654
commit
6f826ba205
|
@ -721,15 +721,8 @@ namespace SparkleShare {
|
|||
string [] files = Directory.GetFiles (path);
|
||||
|
||||
foreach (string file in files)
|
||||
if (!IsSymlink (file))
|
||||
if (file.IsSymlink ())
|
||||
File.SetAttributes (file, FileAttributes.Normal);
|
||||
}
|
||||
|
||||
|
||||
bool IsSymlink (string file)
|
||||
{
|
||||
FileAttributes attributes = File.GetAttributes (file);
|
||||
return ((attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,8 +81,9 @@ namespace Sparkles {
|
|||
}
|
||||
|
||||
|
||||
public static bool IsSymlink (this FileSystemInfo file)
|
||||
public static bool IsSymlink (this string path)
|
||||
{
|
||||
var file = new FileInfo (path);
|
||||
return ((file.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint);
|
||||
}
|
||||
|
||||
|
|
|
@ -1116,7 +1116,7 @@ namespace Sparkles.Git {
|
|||
|
||||
try {
|
||||
foreach (DirectoryInfo directory in parent.GetDirectories ()) {
|
||||
if (directory.IsSymlink () ||
|
||||
if (directory.FullName.IsSymlink () ||
|
||||
directory.Name.Equals (".git") ||
|
||||
directory.Name.Equals ("rebase-apply")) {
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ namespace Sparkles.Git {
|
|||
|
||||
try {
|
||||
foreach (FileInfo file in parent.GetFiles ()) {
|
||||
if (file.IsSymlink ())
|
||||
if (file.FullName.IsSymlink ())
|
||||
continue;
|
||||
|
||||
if (file.Name.Equals (".empty"))
|
||||
|
|
Loading…
Reference in a new issue