summaryrefslogtreecommitdiff
path: root/SparkleLib/SparkleFetcherBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SparkleLib/SparkleFetcherBase.cs')
-rwxr-xr-xSparkleLib/SparkleFetcherBase.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs
index beaf6c1..4e91f4d 100755
--- a/SparkleLib/SparkleFetcherBase.cs
+++ b/SparkleLib/SparkleFetcherBase.cs
@@ -2,9 +2,9 @@
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
+// it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -95,6 +95,7 @@ namespace SparkleLib {
"~*.ppt", "~*.PPT", "~*.pptx", "~*.PPTX",
"~*.xls", "~*.XLS", "~*.xlsx", "~*.XLSX",
"~*.doc", "~*.DOC", "~*.docx", "~*.DOCX",
+ "~$*",
"*.a$v", // QuarkXPress
"*/CVS/*", ".cvsignore", "*/.cvsignore", // CVS
"/.svn/*", "*/.svn/*", // Subversion
@@ -139,8 +140,15 @@ namespace SparkleLib {
SparkleLogger.LogInfo ("Fetcher", TargetFolder + " | Fetching folder: " + RemoteUrl);
- if (Directory.Exists (TargetFolder))
- Directory.Delete (TargetFolder, true);
+ try {
+ if (Directory.Exists (TargetFolder))
+ Directory.Delete (TargetFolder, true);
+
+ } catch (IOException) {
+ this.errors.Add ("\"" + TargetFolder + "\" is read-only.");
+ Failed ();
+ return;
+ }
this.thread = new Thread (() => {
if (Fetch ()) {
@@ -184,7 +192,8 @@ namespace SparkleLib {
Identifier = CreateIdentifier ();
File.WriteAllText (identifier_path, Identifier);
- CreateInitialChangeSet ();
+ if (IsFetchedRepoEmpty)
+ CreateInitialChangeSet ();
}
File.SetAttributes (identifier_path, FileAttributes.Hidden);