Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
1639bfdb
Commit
1639bfdb
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Enter commit message
parent
84f480b1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ATXCommon/FsUtils.cs
+15
-0
15 additions, 0 deletions
ATXCommon/FsUtils.cs
AutoTx/AutoTx.cs
+1
-14
1 addition, 14 deletions
AutoTx/AutoTx.cs
with
16 additions
and
14 deletions
ATXCommon/FsUtils.cs
+
15
−
0
View file @
1639bfdb
...
...
@@ -185,5 +185,20 @@ namespace ATXCommon
Log
.
Error
(
"Error collecting orphaned files: {0}\n{1}"
,
ex
.
Message
,
ex
.
StackTrace
);
}
}
/// <summary>
/// Ensure the required spooling directories (managed/incoming) exist.
/// </summary>
/// <param name="incoming">The path to the incoming location.</param>
/// <param name="managed">The path to the managed location.</param>
/// <returns>True if all dirs exist or were created successfully.</returns>
public
static
bool
CheckSpoolingDirectories
(
string
incoming
,
string
managed
)
{
var
retval
=
CheckForDirectory
(
incoming
);
retval
&=
CheckForDirectory
(
managed
);
retval
&=
CheckForDirectory
(
Path
.
Combine
(
managed
,
"PROCESSING"
));
retval
&=
CheckForDirectory
(
Path
.
Combine
(
managed
,
"DONE"
));
retval
&=
CheckForDirectory
(
Path
.
Combine
(
managed
,
"UNMATCHED"
));
return
retval
;
}
}
}
This diff is collapsed.
Click to expand it.
AutoTx/AutoTx.cs
+
1
−
14
View file @
1639bfdb
...
...
@@ -255,7 +255,7 @@ namespace AutoTx
SetupMailLogging
();
var
configInvalid
=
false
;
if
(
CheckSpoolingDirectories
()
==
false
)
{
if
(
FsUtils
.
CheckSpoolingDirectories
(
_incomingPath
,
_managedPath
)
==
false
)
{
Log
.
Error
(
"ERROR checking spooling directories (incoming / managed)!"
);
configInvalid
=
true
;
}
...
...
@@ -785,19 +785,6 @@ namespace AutoTx
return
true
;
}
/// <summary>
/// Ensure the required spooling directories (managed/incoming) exist.
/// </summary>
/// <returns>True if all dirs exist or were created successfully.</returns>
private
bool
CheckSpoolingDirectories
()
{
var
retval
=
FsUtils
.
CheckForDirectory
(
_incomingPath
);
retval
&=
FsUtils
.
CheckForDirectory
(
_managedPath
);
retval
&=
FsUtils
.
CheckForDirectory
(
Path
.
Combine
(
_managedPath
,
"PROCESSING"
));
retval
&=
FsUtils
.
CheckForDirectory
(
Path
.
Combine
(
_managedPath
,
"DONE"
));
retval
&=
FsUtils
.
CheckForDirectory
(
Path
.
Combine
(
_managedPath
,
"UNMATCHED"
));
return
retval
;
}
/// <summary>
/// Helper to create directories for all users that have one in the local
/// user directory (C:\Users) AND in the DestinationDirectory.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment