Преглед на файлове

Refs #15 diagnose filesystem errors

isundil преди 7 месеца
родител
ревизия
3c2db19ece
променени са 3 файла, в които са добавени 10 реда и са изтрити 9 реда
  1. 7 7
      Engine/Engine.cpp
  2. 2 2
      fakeRaid.vcxproj.user
  3. 1 0
      fakeRaid/mBreadcrumb.h

+ 7 - 7
Engine/Engine.cpp

@@ -135,7 +135,7 @@ FileAndSumList Engine::ListFiles(const std::string& root, const std::deque<std::
 	const std::string path = BuildCurrentDirPath(root, wd);
 	Crypto cryptoEngine;
 
-	std::filesystem::directory_iterator directoryIterator;
+	std::filesystem::directory_iterator directoryIterator; // FIXME error handling
 	try
 	{
 		directoryIterator = std::filesystem::directory_iterator(path);
@@ -237,7 +237,7 @@ size_t Engine::CountFilesRecur()
 
 	do
 	{
-		std::filesystem::directory_iterator directoryIterator;
+		std::filesystem::directory_iterator directoryIterator; // FIXME error handling
 		try
 		{
 			directoryIterator = std::filesystem::directory_iterator(itemsToDo.front());
@@ -289,18 +289,18 @@ void Engine::DirExistsOrThrow() const
 void Engine::RemoveFiles(const std::vector<std::string>& paths) const
 {
 	for (const std::string& path: paths)
-		std::filesystem::remove(path);
+		std::filesystem::remove(path); // FIXME error handling
 }
 
 void Engine::RemoveDirs(const std::vector<std::string>& paths) const
 {
 	for (const std::string& path : paths)
-		std::filesystem::remove_all(path);
+		std::filesystem::remove_all(path); // FIXME error handling
 }
 
 void Engine::CopyItem(const IEngine::CopyInstruction& item) const
 {
-	std::filesystem::copy(item.source, item.destination, std::filesystem::copy_options::overwrite_existing | std::filesystem::copy_options::recursive);
+	std::filesystem::copy(item.source, item.destination, std::filesystem::copy_options::overwrite_existing | std::filesystem::copy_options::recursive); // FIXME error handling
 }
 
 void Engine::CopyItems(const std::vector<IEngine::CopyInstruction>& paths) const
@@ -320,7 +320,7 @@ bool Engine::AnyFileExists(const std::vector<std::string>& files, const std::str
 			outputPath /= file.filename();
 			if (std::filesystem::exists(outputPath))
 			{
-				if (std::filesystem::equivalent(outputPath, file))
+				if (std::filesystem::equivalent(outputPath, file)) // FIXME error handling
 					throw IEngine::SameFileError();
 				return true;
 			}
@@ -338,7 +338,7 @@ void Engine::AddFiles(const std::vector<std::string>& files, const std::string&
 		{
 			std::filesystem::path destination(root + "/" + _destination);
 			destination /= file.filename();
-			std::filesystem::copy(file, destination, std::filesystem::copy_options::overwrite_existing | std::filesystem::copy_options::recursive);
+			std::filesystem::copy(file, destination, std::filesystem::copy_options::overwrite_existing | std::filesystem::copy_options::recursive); // FIXME error handling
 		}
 	}
 }

+ 2 - 2
fakeRaid.vcxproj.user

@@ -2,10 +2,10 @@
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerCommandArguments>C:/Users/isund/projects/fakeRaid/test/A C:/Users/isund/projects/fakeRaid/test/B C:/Users/isund/projects/fakeRaid/test/C</LocalDebuggerCommandArguments>
+    <LocalDebuggerCommandArguments>Z:\peps Z:\isundil</LocalDebuggerCommandArguments>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LocalDebuggerCommandArguments>C:/Users/isund/projects/fakeRaid/test/A C:/Users/isund/projects/fakeRaid/test/B C:/Users/isund/projects/fakeRaid/test/C</LocalDebuggerCommandArguments>
+    <LocalDebuggerCommandArguments>Z:\peps Z:\isundil</LocalDebuggerCommandArguments>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

+ 1 - 0
fakeRaid/mBreadcrumb.h

@@ -1,5 +1,6 @@
 #pragma once
 
+#include <QUrl>
 #include "breadcrumb.h"
 
 namespace craftlab::fakeraid::ui