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
309dd569
Commit
309dd569
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
No need to have global vars for CreateIncomingDirectories.
parent
60bf54a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AutoTx/AutoTx.cs
+5
-8
5 additions, 8 deletions
AutoTx/AutoTx.cs
with
5 additions
and
8 deletions
AutoTx/AutoTx.cs
+
5
−
8
View file @
309dd569
...
...
@@ -31,14 +31,11 @@ namespace AutoTx
private
string
_incomingPath
;
private
string
_managedPath
;
private
string
[]
_remoteUserDirs
;
private
string
[]
_localUserDirs
;
private
List
<
string
>
_transferredFiles
=
new
List
<
string
>();
private
int
_txProgress
;
private
DateTime
_lastUserDirCheck
=
DateTime
.
Now
;
private
DateTime
_lastUserDirCheck
=
DateTime
.
MinValue
;
// the transfer state:
private
enum
TxState
...
...
@@ -790,23 +787,23 @@ namespace AutoTx
/// user directory (C:\Users) AND in the DestinationDirectory.
/// </summary>
private
void
CreateIncomingDirectories
()
{
_
localUserDirs
=
new
DirectoryInfo
(
@"C:\Users"
)
var
localUserDirs
=
new
DirectoryInfo
(
@"C:\Users"
)
.
GetDirectories
()
.
Select
(
d
=>
d
.
Name
)
.
ToArray
();
_
remoteUserDirs
=
new
DirectoryInfo
(
_config
.
DestinationDirectory
)
var
remoteUserDirs
=
new
DirectoryInfo
(
_config
.
DestinationDirectory
)
.
GetDirectories
()
.
Select
(
d
=>
d
.
Name
)
.
ToArray
();
foreach
(
var
userDir
in
_
localUserDirs
)
{
foreach
(
var
userDir
in
localUserDirs
)
{
// don't create an incoming directory for the same name as the
// temporary transfer location:
if
(
_config
.
TmpTransferDir
==
userDir
)
continue
;
// don't create a directory if it doesn't exist on the target:
if
(!
_
remoteUserDirs
.
Contains
(
userDir
))
if
(!
remoteUserDirs
.
Contains
(
userDir
))
continue
;
FsUtils
.
CreateNewDirectory
(
Path
.
Combine
(
_incomingPath
,
userDir
),
false
);
...
...
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