diff --git a/Timelapse.Pack/Program.cs b/Timelapse.Pack/Program.cs
index dd9c332..53bbf90 100644
--- a/Timelapse.Pack/Program.cs
+++ b/Timelapse.Pack/Program.cs
@@ -110,7 +110,7 @@ public class TimelapsePack
}
string fname =Path.GetFileName(f);
- DirCopy(f,Path.Combine(src,fname),copyItem);
+ DirCopy(f,Path.Combine(dest,fname),copyItem);
}
foreach(var f in Directory.GetFiles(src))
@@ -120,7 +120,7 @@ public class TimelapsePack
continue;
}
string fname =Path.GetFileName(f);
- File.Copy(f,Path.Combine(src,fname));
+ File.Copy(f,Path.Combine(dest,fname),true);
}
}
public static string? Pack(string? outname)
@@ -141,7 +141,7 @@ public class TimelapsePack
if(!string.IsNullOrWhiteSpace(outPut))
{
Directory.CreateDirectory("_build/extension");
- File.Copy("extension_info.json","_build/extension_info.json");
+ File.Copy("extension_info.json","_build/extension_info.json",true);
string? dirname=Path.GetDirectoryName(outPut);
if(!string.IsNullOrWhiteSpace(dirname)){
@@ -155,7 +155,7 @@ public class TimelapsePack
return !_hasDeps.Contains(cF);
});
string fname = $"{Path.GetFileNameWithoutExtension(outPut)}.zip";
- File.Copy(outPut,"_build/extension/extension.dll");
+ File.Copy(outPut,"_build/extension/extension.dll",true);
if(!string.IsNullOrWhiteSpace(outname))
{
@@ -166,7 +166,7 @@ public class TimelapsePack
File.Delete(fname);
}
ZipFile.CreateFromDirectory ("_build",fname,CompressionLevel.SmallestSize, false);
- Directory.Delete("_build");
+ Directory.Delete("_build",true);
return fname;
}
}
diff --git a/Timelapse.Pack/Timelapse.Pack.csproj b/Timelapse.Pack/Timelapse.Pack.csproj
index 92937ea..e66f543 100644
--- a/Timelapse.Pack/Timelapse.Pack.csproj
+++ b/Timelapse.Pack/Timelapse.Pack.csproj
@@ -17,9 +17,9 @@
Tesses.TimelapsePack
Mike Nolan
Tesses
- 1.0.1
- 1.0.1
- 1.0.1
+ 1.0.2
+ 1.0.2
+ 1.0.2
Extension Packaging tool for TimelapseNow
GPL-3.0-only
true
diff --git a/TimelapseApi/ExtensionLoader.cs b/TimelapseApi/ExtensionLoader.cs
index 496b506..692dcfa 100644
--- a/TimelapseApi/ExtensionLoader.cs
+++ b/TimelapseApi/ExtensionLoader.cs
@@ -25,9 +25,15 @@ public class ExtensionLoader
var info=GetExtensionInfo(Path.Combine(dirTmp,"extension_info.json"));
if(info != null)
{
+
Directory.CreateDirectory(Api.GetInternalFile("ExtensionInfo"));
- File.Copy(Path.Combine(dirTmp,"extension_info.json"),Api.GetInternalFile("ExtensionInfo",$"{info.name}.json"));
- Directory.Move(Path.Combine(dirTmp,"ExtTMP","extension"),Api.GetInternalFile("ExtensionBinaries",info.name));
+ if(Directory.Exists(Api.GetInternalFile("ExtensionBinaries",info.name)))
+ {
+ Directory.Delete(Api.GetInternalFile("ExtensionBinaries",info.name),true);
+ }
+ File.Copy(Path.Combine(dirTmp,"extension_info.json"),Api.GetInternalFile("ExtensionInfo",$"{info.name}.json"),true);
+
+ Directory.Move(Path.Combine(dirTmp,"extension"),Api.GetInternalFile("ExtensionBinaries",info.name));
File.Move(Api.GetInternalFile("ExtensionBinaries",info.name,"extension.dll"),Api.GetInternalFile("ExtensionBinaries",info.name,$"{info.name}.dll"));
if(add)
@@ -56,6 +62,7 @@ public class ExtensionLoader
}
}
+ Directory.Delete(dirTmp,true);
}
public static ExtensionInfo? GetExtensionInfo(string filename)
{