@@ -642,10 +642,17 @@ public static string Init(string path)
642
642
nameof ( path ) ) ;
643
643
}
644
644
645
+ if ( Repository . IsValid ( path ) )
646
+ {
647
+ throw new ArgumentException (
648
+ "Specified path already contains an existing Git repository; cannot initialize a new InRule Git repository." ,
649
+ nameof ( path ) ) ;
650
+ }
651
+
645
652
if ( IsValid ( path ) )
646
653
{
647
654
throw new ArgumentException (
648
- "Specified path already contains an existing git repository; cannot initialize a new Git repository." ,
655
+ "Specified path already contains an existing InRule Git repository; cannot initialize a new InRule Git repository." ,
649
656
nameof ( path ) ) ;
650
657
}
651
658
@@ -698,7 +705,7 @@ public static InRuleGitRepository Open(string path)
698
705
if ( ! IsValid ( path ) )
699
706
{
700
707
throw new ArgumentException (
701
- "Specified path is not a valid Git repository." ,
708
+ "Specified path is not a valid InRule Git repository." ,
702
709
nameof ( path ) ) ;
703
710
}
704
711
@@ -737,7 +744,7 @@ private static void SetFolderIcon(string path)
737
744
if ( path == null ) throw new ArgumentNullException ( nameof ( path ) ) ;
738
745
if ( string . IsNullOrWhiteSpace ( path ) ) throw new ArgumentException ( "Specified path cannot be null or whitespace." , nameof ( path ) ) ;
739
746
740
- File . SetAttributes ( path , File . GetAttributes ( path ) /*| FileAttributes.System*/ | FileAttributes . ReadOnly ) ;
747
+ File . SetAttributes ( path , File . GetAttributes ( path ) | FileAttributes . ReadOnly ) ;
741
748
742
749
var logoPath = Path . Combine ( path , "logo.ico" ) ;
743
750
using ( Stream input = typeof ( InRuleGitRepository ) . Assembly . GetManifestResourceStream ( "Sknet.InRuleGitStorage.logo.ico" ) )
0 commit comments