Skip to content
Snippets Groups Projects
Commit 9ee83db4 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Make MoveToManagedLocation boolean instead of void.

parent 34352f39
No related branches found
No related tags found
No related merge requests found
...@@ -711,7 +711,9 @@ namespace ATxService ...@@ -711,7 +711,9 @@ namespace ATxService
/// </summary> /// </summary>
/// CAUTION: this method is called as a consequence of the main timer being triggered, so /// CAUTION: this method is called as a consequence of the main timer being triggered, so
/// be aware that any message dispatched here could potentially show up every second! /// be aware that any message dispatched here could potentially show up every second!
private void MoveToManagedLocation(DirectoryInfo userDir) { /// <param name="userDir">The directory to be moved to the processing location.</param>
/// <returns>True in case of success, false otherwise.</returns>
private bool MoveToManagedLocation(DirectoryInfo userDir) {
string errMsg; string errMsg;
try { try {
// first check for individual files and collect them: // first check for individual files and collect them:
...@@ -731,7 +733,7 @@ namespace ATxService ...@@ -731,7 +733,7 @@ namespace ATxService
var timeStamp = TimeUtils.Timestamp(); var timeStamp = TimeUtils.Timestamp();
var targetDir = Path.Combine(processingPath, timeStamp, userDir.Name); var targetDir = Path.Combine(processingPath, timeStamp, userDir.Name);
if (FsUtils.MoveAllSubDirs(userDir, targetDir)) if (FsUtils.MoveAllSubDirs(userDir, targetDir))
return; return true;
errMsg = $"unable to move [{userDir.FullName}]"; errMsg = $"unable to move [{userDir.FullName}]";
} }
...@@ -740,6 +742,7 @@ namespace ATxService ...@@ -740,6 +742,7 @@ namespace ATxService
} }
Log.Error("=== Moving directory [{0}] to the processing location failed: {1} ===", Log.Error("=== Moving directory [{0}] to the processing location failed: {1} ===",
userDir.FullName, errMsg); userDir.FullName, errMsg);
return false;
} }
/// <summary> /// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment