File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ Changes:
1111 Old: DEBUG: skipping /files/1.txt: is not included by ` [0-9].txt `
1212 New: DEBUG: skipping /files/1.txt: /files/ is not included by ` [0-9].txt `
1313
14+ Bugfixes:
15+ - When using a Swift source, pseudo-directories are now recognized and transferred correctly.
16+
1417# v2.4.0 (2018-06-14)
1518
1619New features:
Original file line number Diff line number Diff line change @@ -164,7 +164,11 @@ func (s *SwiftLocation) Connect() error {
164164func (s * SwiftLocation ) ObjectAtPath (path string ) * schwift.Object {
165165 objectName := strings .TrimPrefix (path , "/" )
166166 if s .ObjectNamePrefix != "" {
167+ isPseudoDir := strings .HasSuffix (objectName , "/" )
167168 objectName = filepath .Join (s .ObjectNamePrefix , objectName )
169+ if isPseudoDir {
170+ objectName += "/"
171+ }
168172 }
169173 return s .Container .Object (objectName )
170174}
Original file line number Diff line number Diff line change @@ -562,6 +562,35 @@ This file does not get cleaned up because it's not below object_prefix.
562562Hello World.
563563EOF
564564
565+ # ###############################################################################
566+ step ' Test 11: Swift sources with pseudo-directories'
567+
568+ if [ " $1 " = http ]; then
569+ echo " >> Test skipped (works only with Swift source)."
570+ else
571+
572+ upload_file_from_stdin pseudo/directory/ < /dev/null
573+ upload_file_from_stdin pseudo/regularfile.txt << -EOF
574+ Hello File.
575+ EOF
576+
577+ mirror << -EOF
578+ swift: { $AUTH_PARAMS }
579+ jobs:
580+ - from: ${SOURCE_SPEC}
581+ to:
582+ container: ${CONTAINER_BASE} -test11
583+ only: pseudo/
584+ EOF
585+
586+ expect test11 << -EOF
587+ >> pseudo/directory/
588+ >> pseudo/regularfile.txt
589+ Hello File.
590+ EOF
591+
592+ fi # end of: if [ "$1" = http ]
593+
565594# ###############################################################################
566595# cleanup before exiting
567596
You can’t perform that action at this time.
0 commit comments