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
1d0ea857
Commit
1d0ea857
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Check if size is non-zero before starting a transfer.
parent
006cd61d
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
ATxService/RoboCommand.cs
+11
-2
11 additions, 2 deletions
ATxService/RoboCommand.cs
with
11 additions
and
2 deletions
ATxService/RoboCommand.cs
+
11
−
2
View file @
1d0ea857
...
...
@@ -21,9 +21,16 @@ namespace ATxService
if
(
_transferState
!=
TxState
.
Stopped
)
return
;
_roboCommand
=
new
RoboCommand
();
var
totalSize
=
FsUtils
.
GetDirectorySize
(
sourcePath
);
if
(
totalSize
==
0
)
{
Log
.
Warn
(
"Total size of all files in [{0}] is zero, NOT STARTING a transfer!"
,
sourcePath
);
return
;
}
Log
.
Debug
(
"Size of all files under [{0}] is {1} bytes ({2})"
,
sourcePath
,
totalSize
,
Conv
.
BytesToString
(
totalSize
));
_status
.
CurrentTransferSize
=
totalSize
;
_status
.
CurrentTransferSrc
=
sourcePath
;
_status
.
CurrentTransferSize
=
FsUtils
.
GetDirectorySize
(
sourcePath
);
// the user name is expected to be the last part of the path:
_status
.
CurrentTargetTmp
=
new
DirectoryInfo
(
sourcePath
).
Name
;
...
...
@@ -31,6 +38,8 @@ namespace ATxService
_transferState
=
TxState
.
Active
;
_status
.
TransferInProgress
=
true
;
_roboCommand
=
new
RoboCommand
();
try
{
// events
_roboCommand
.
OnCopyProgressChanged
+=
RsProgressChanged
;
...
...
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