Respect `name` in case of a single directory mount (#750)

Fixes #748
This commit is contained in:
Fedor Korotkov 2024-03-11 11:01:06 -04:00 committed by GitHub
parent 6bf39e73d0
commit 89ff5f6b65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -477,7 +477,7 @@ struct Run: AsyncParsableCommand {
allNamedShares = false
}
}
if directoryShares.count == 1 {
if directoryShares.count == 1 && directoryShares.first!.name == nil {
let directoryShare = directoryShares.first!
let singleDirectoryShare = VZSingleDirectoryShare(directory: try directoryShare.createConfiguration())
sharingDevice.share = singleDirectoryShare