Fixed an issue when using recursion. Cannot be used if the program is called via OneDriveArchiver.exe ".", as it processed (recursively) the already existing backup files. Implemented logic that it checks where source and target directory really are. If equal it just does the plan processing of the files in the main directory (as before)

This commit is contained in:
2020-10-01 16:18:49 +02:00
parent 1a4d1a9555
commit c59688fd28
25 changed files with 140 additions and 85 deletions

View File

@@ -9,7 +9,7 @@
<e p="cd" t="Include" />
<e p="IoHelper.cs" t="Include" />
<e p="obj" t="ExcludeRecursive">
<e p="Release" t="Include">
<e p="Debug" t="Include">
<e p="netcoreapp3.1" t="Include">
<e p="OneDriveArchiver.AssemblyInfo.cs" t="Include" />
</e>

View File

@@ -23,13 +23,29 @@
</component>
<component name="ChangeListManager">
<list default="true" id="29ab5463-4b97-401d-ab54-0cf6c10d440f" name="Default Changelist" comment="Small update using appName in archive method">
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.OneDriveArchiver/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.OneDriveArchiver/.idea/contentModel.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.OneDriveArchiver/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.OneDriveArchiver/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/IoHelper.cs" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/IoHelper.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/OneDriveArchiver.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/OneDriveArchiver.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/Program.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.AssemblyInfo.cs" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.AssemblyInfo.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.AssemblyInfoInputs.cache" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.AssemblyInfoInputs.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.assets.cache" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.assets.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.dll" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/OneDriveArchiver.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/project.assets.json" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/project.assets.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/project.nuget.cache" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/project.nuget.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OneDriveArchiver/obj/rider.project.restore.info" beforeDir="false" afterPath="$PROJECT_DIR$/OneDriveArchiver/obj/rider.project.restore.info" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -47,14 +63,13 @@
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/OneDriveArchiver/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/johan/OneDrive/DEV/OneDriveArchiver/OneDriveArchiver/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/OneDriveArchiver/Program.cs" />
<option value="$PROJECT_DIR$/OneDriveArchiver/IoHelper.cs" />
<option value="$PROJECT_DIR$/OneDriveArchiver/Program.cs" />
</list>
</option>
</component>
@@ -69,18 +84,20 @@
<component name="PropertiesComponent">
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.35031447" />
<property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.35055724" />
<property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.29989868" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RunManager">
<configuration name="OneDriveArchiver" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1/OneDriveArchiver.dll" />
<option name="PROGRAM_PARAMETERS" value="&quot;C:\Users\johan\Nextcloud\Temp&quot; &quot;C:\Users\johan\OneDrive\Bilder\Eigene Aufnahmen&quot;" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/OneDriveArchiver/bin/Release/netcoreapp3.1" />
<option name="EXE_PATH" value="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1/OneDriveArchiver.dll" />
<option name="PROGRAM_PARAMETERS" value="&quot;C:\Users\johan\OneDrive\Bilder\Eigene Aufnahmen&quot; &quot;C:\Users\johan\OneDrive\Bilder\Eigene Aufnahmen&quot; " />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/OneDriveArchiver/bin/Debug/netcoreapp3.1" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
@@ -112,7 +129,10 @@
<workItem from="1599741128589" duration="191000" />
<workItem from="1599741462556" duration="654000" />
<workItem from="1600069152794" duration="855000" />
<workItem from="1600685920761" duration="4275000" />
<workItem from="1600685920761" duration="7288000" />
<workItem from="1601379132086" duration="1332000" />
<workItem from="1601560085210" duration="77000" />
<workItem from="1601560349440" duration="1110000" />
</task>
<task id="LOCAL-00001" summary="Migrated solution to .net core 3.1.">
<created>1597346544727</created>
@@ -163,7 +183,14 @@
<option name="project" value="LOCAL" />
<updated>1600691836875</updated>
</task>
<option name="localTasksCounter" value="8" />
<task id="LOCAL-00008" summary="Small update using appName in archive method">
<created>1600692481286</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1600692481286</updated>
</task>
<option name="localTasksCounter" value="9" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -195,118 +222,143 @@
<option name="LAST_COMMIT_MESSAGE" value="Small update using appName in archive method" />
</component>
<component name="WindowStateProjectService">
<state x="288" y="190" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1600687054582">
<screen x="0" y="0" width="1664" height="1069" />
<state x="2850" y="198" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1601561619469">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state x="2850" y="198" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561619469" />
<state x="288" y="190" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687054582" />
<state width="399" height="466" key="DebuggerActiveHint" timestamp="1597406505502">
<screen x="0" y="0" width="1664" height="1069" />
</state>
<state width="399" height="466" key="DebuggerActiveHint/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1597406505502" />
<state width="1621" height="283" key="GridCell.Tab.0.bottom" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.0.bottom" timestamp="1601561429032">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.0.bottom/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429032" />
<state width="1621" height="283" key="GridCell.Tab.0.bottom/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="292" key="GridCell.Tab.0.bottom/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786589" />
<state width="1621" height="283" key="GridCell.Tab.0.center" timestamp="1600687796478">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.0.center" timestamp="1601561429032">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.0.center/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429032" />
<state width="1621" height="283" key="GridCell.Tab.0.center/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796478" />
<state width="1621" height="292" key="GridCell.Tab.0.center/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786589" />
<state width="1621" height="283" key="GridCell.Tab.0.left" timestamp="1600687796478">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.0.left" timestamp="1601561429031">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.0.left/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429031" />
<state width="1621" height="283" key="GridCell.Tab.0.left/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796478" />
<state width="1621" height="292" key="GridCell.Tab.0.left/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786589" />
<state width="1621" height="283" key="GridCell.Tab.0.right" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.0.right" timestamp="1601561429032">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.0.right/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429032" />
<state width="1621" height="283" key="GridCell.Tab.0.right/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="292" key="GridCell.Tab.0.right/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786589" />
<state width="1621" height="283" key="GridCell.Tab.1.bottom" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.1.bottom" timestamp="1601561429466">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.1.bottom/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429466" />
<state width="1621" height="283" key="GridCell.Tab.1.bottom/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.1.bottom/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.1.center" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.1.center" timestamp="1601561429466">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.1.center/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429466" />
<state width="1621" height="283" key="GridCell.Tab.1.center/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.1.center/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.1.left" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.1.left" timestamp="1601561429466">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.1.left/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429466" />
<state width="1621" height="283" key="GridCell.Tab.1.left/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.1.left/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.1.right" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.1.right" timestamp="1601561429466">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.1.right/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601561429466" />
<state width="1621" height="283" key="GridCell.Tab.1.right/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.1.right/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.2.bottom" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.2.bottom" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.2.bottom/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.2.bottom/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.2.bottom/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.2.center" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.2.center" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.2.center/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.2.center/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.2.center/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.2.left" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.2.left" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.2.left/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.2.left/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.2.left/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.2.right" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.2.right" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.2.right/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.2.right/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.2.right/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.3.bottom" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.3.bottom" timestamp="1601560180084">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.3.bottom/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180084" />
<state width="1621" height="283" key="GridCell.Tab.3.bottom/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.3.bottom/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.3.center" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.3.center" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.3.center/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.3.center/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.3.center/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.3.left" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.3.left" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.3.left/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.3.left/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.3.left/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.3.right" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.3.right" timestamp="1601560180083">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.3.right/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180083" />
<state width="1621" height="283" key="GridCell.Tab.3.right/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.3.right/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.4.bottom" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.4.bottom" timestamp="1601560180084">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.4.bottom/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180084" />
<state width="1621" height="283" key="GridCell.Tab.4.bottom/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.4.bottom/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786580" />
<state width="1621" height="283" key="GridCell.Tab.4.center" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.4.center" timestamp="1601560180084">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.4.center/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180084" />
<state width="1621" height="283" key="GridCell.Tab.4.center/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.4.center/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.4.left" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.4.left" timestamp="1601560180084">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.4.left/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180084" />
<state width="1621" height="283" key="GridCell.Tab.4.left/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.4.left/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state width="1621" height="283" key="GridCell.Tab.4.right" timestamp="1600687796479">
<screen x="0" y="0" width="1664" height="1069" />
<state width="2005" height="295" key="GridCell.Tab.4.right" timestamp="1601560180084">
<screen x="2496" y="0" width="2048" height="1112" />
</state>
<state width="2005" height="295" key="GridCell.Tab.4.right/0.0.1664.1069/2496.0.2048.1112@2496.0.2048.1112" timestamp="1601560180084" />
<state width="1621" height="283" key="GridCell.Tab.4.right/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1600687796479" />
<state width="1621" height="283" key="GridCell.Tab.4.right/0.0.1664.1069@0.0.1664.1069" timestamp="1597591786579" />
<state x="425" y="267" key="Rider.ProjectTemplateDialog.Size" timestamp="1597346163416">
<screen x="0" y="0" width="1664" height="1069" />
</state>
<state x="425" y="267" key="Rider.ProjectTemplateDialog.Size/0.0.1664.1069/2496.0.640.440@0.0.1664.1069" timestamp="1597346163416" />
<state x="334" y="180" key="SettingsEditor" timestamp="1601386632834">
<screen x="0" y="0" width="1664" height="1069" />
</state>
<state x="334" y="180" key="SettingsEditor/0.0.1664.1069/2496.0.2048.1112@0.0.1664.1069" timestamp="1601386632834" />
<state x="93" y="93" width="1479" height="884" key="VCS.FileHistoryDialog" timestamp="1600691741046">
<screen x="0" y="0" width="1664" height="1069" />
</state>
@@ -325,29 +377,16 @@
<breakpoints>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/OneDriveArchiver/Program.cs</url>
<line>37</line>
<properties documentPath="C:\Users\johan\OneDrive\DEV\OneDriveArchiver\OneDriveArchiver\Program.cs" initialLine="40">
<line>11</line>
<properties documentPath="C:\Users\johan\OneDrive\DEV\OneDriveArchiver\OneDriveArchiver\Program.cs" initialLine="11">
<startOffsets>
<option value="1209" />
<option value="207" />
</startOffsets>
<endOffsets>
<option value="1257" />
<option value="250" />
</endOffsets>
</properties>
<option name="timeStamp" value="6" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/OneDriveArchiver/Program.cs</url>
<line>51</line>
<properties documentPath="C:\Users\johan\OneDrive\DEV\OneDriveArchiver\OneDriveArchiver\Program.cs" initialLine="52">
<startOffsets>
<option value="1947" />
</startOffsets>
<endOffsets>
<option value="2025" />
</endOffsets>
</properties>
<option name="timeStamp" value="8" />
<option name="timeStamp" value="1" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>

View File

@@ -91,14 +91,19 @@ namespace OneDriveArchiver
/// <param name="currentDirectoryWithFiles">Current directory for processing</param>
/// <param name="appName">Name of application</param>
/// <param name="targetPath">Target archiving path to store files</param>
public static void ProcessFilesForDirectory(string currentDirectoryWithFiles, string appName, string targetPath)
/// <param name="needsRecursion">Recursive processing needed or not</param>
public static void ProcessFilesForDirectory(string currentDirectoryWithFiles, string appName, string targetPath,
bool needsRecursion)
{
var containedDirectories = Directory.GetDirectories(currentDirectoryWithFiles);
foreach (var containedDirectory in containedDirectories)
if (needsRecursion)
{
ProcessFilesForDirectory(containedDirectory, appName, targetPath);
var containedDirectories = Directory.GetDirectories(currentDirectoryWithFiles);
foreach (var containedDirectory in containedDirectories)
{
ProcessFilesForDirectory(containedDirectory, appName, targetPath, needsRecursion);
}
}
// process the files in the directory (if all directories have been traversed...
var filesToProcess = Directory.GetFiles(currentDirectoryWithFiles);
if (filesToProcess.Length > 1)

View File

@@ -11,6 +11,7 @@
<Optimize>false</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
</PropertyGroup>
</Project>

View File

@@ -36,13 +36,24 @@ namespace OneDriveArchiver
{
// normal processing...
Console.WriteLine($"{appName}: starting up...");
var needsRecursion = false;
// set target path
var targetPath = args.Length == 1 ? Path.GetFullPath(".") : args[1];
var startUpTime = DateTime.Now;
// check if source directory is equal to target. In that case
// we do not need any recursion at all
var sourcePath = Path.GetFullPath(args[0]);
if (sourcePath != targetPath)
{
needsRecursion = true;
}
// process the base directory, plus possible containing directories recursively
IoHelper.ProcessFilesForDirectory(args[0], appName, targetPath);
IoHelper.ProcessFilesForDirectory(args[0], appName, targetPath, needsRecursion);
var endProcessingTime = DateTime.Now;
var processingTime = endProcessingTime - startUpTime;

View File

@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,5 +18,5 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyTitleAttribute("OneDriveArchiver")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0")]
// Generated by the MSBuild WriteCodeFragment class.
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -1 +1 @@
15980079412695528
16013791295246375