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
b0d7b8ba
Commit
b0d7b8ba
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Make transfer source path a parameter of StartTransfer().
parent
9b82a505
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
AutoTx/AutoTx.cs
+2
-4
2 additions, 4 deletions
AutoTx/AutoTx.cs
AutoTx/RoboCommand.cs
+4
-2
4 additions, 2 deletions
AutoTx/RoboCommand.cs
with
6 additions
and
6 deletions
AutoTx/AutoTx.cs
+
2
−
4
View file @
b0d7b8ba
...
...
@@ -634,14 +634,12 @@ namespace AutoTx
return
;
}
try
{
_status
.
CurrentTransferSrc
=
subdirs
[
0
].
FullName
;
_status
.
CurrentTransferSize
=
GetDirectorySize
(
_status
.
CurrentTransferSrc
);
StartTransfer
(
subdirs
[
0
].
FullName
);
}
catch
(
Exception
ex
)
{
writeLog
(
"Error checking for data to be transferred: "
+
ex
.
Message
);
throw
;
}
StartTransfer
();
}
/// <summary>
...
...
@@ -706,7 +704,7 @@ namespace AutoTx
writeLogDebug
(
"Resuming transfer from '"
+
_status
.
CurrentTransferSrc
+
"' to '"
+
ExpandCurrentTargetTmp
()
+
"'"
);
StartTransfer
();
StartTransfer
(
_status
.
CurrentTransferSrc
);
}
#
endregion
...
...
This diff is collapsed.
Click to expand it.
AutoTx/RoboCommand.cs
+
4
−
2
View file @
b0d7b8ba
...
...
@@ -16,12 +16,14 @@ namespace AutoTx
/// false. The currently processed path is stored in the global status
/// variable CurrentTransferSrc.
/// </summary>
private
void
StartTransfer
()
{
private
void
StartTransfer
(
string
sourcePath
)
{
// only proceed when in a valid state:
if
(
_transferState
!=
TxState
.
Stopped
)
return
;
var
sourcePath
=
_status
.
CurrentTransferSrc
;
_status
.
CurrentTransferSrc
=
sourcePath
;
_status
.
CurrentTransferSize
=
GetDirectorySize
(
sourcePath
);
// the user name is expected to be the last part of the path:
_status
.
CurrentTargetTmp
=
new
DirectoryInfo
(
sourcePath
).
Name
;
CreateNewDirectory
(
ExpandCurrentTargetTmp
(),
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