Skip to content

Commit

Permalink
renamed variables to be more distinctive at a glance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dabnsky committed Jul 3, 2024
1 parent 8a647fd commit 585e500
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions component/libfuse/libfuse2_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,31 +162,31 @@ func (lf *Libfuse) initFuse() error {
// TODO: We can support any type of valid network share path so this path could
// be configurable for the config file. But this is a good default.

// by default storageName will be blank
var storageName string
var cloudStorageKind string
// by default nameStorage will be blank
var nameStorage string
var kindStorage string
// Borrow bucket-name string from attribute cache
if config.IsSet("s3storage.bucket-name") {

err := config.UnmarshalKey("s3storage.bucket-name", &storageName)
cloudStorageKind = "bucket"
err := config.UnmarshalKey("s3storage.bucket-name", &nameStorage)
kindStorage = "bucket"
if err != nil {
storageName = "default"
cloudStorageKind = "Cloud Storage"
nameStorage = "default"
kindStorage = "Cloud Storage"
log.Err("ParseAndReadDynamicConfig : Failed to unmarshal s3storage.bucket-name")
}
} else if config.IsSet("azstorage.container") {
err := config.UnmarshalKey("azstorage.container", &storageName)
cloudStorageKind = "container"
err := config.UnmarshalKey("azstorage.container", &nameStorage)
kindStorage = "container"
if err != nil {
storageName = "default"
cloudStorageKind = "Cloud Storage"
nameStorage = "default"
kindStorage = "Cloud Storage"
log.Err("ParseAndReadDynamicConfig : Failed to unmarshal s3storage.bucket-name")
}

}

volumePrefix := fmt.Sprintf("--VolumePrefix=\\%s\\%s", cloudStorageKind, storageName)
volumePrefix := fmt.Sprintf("--VolumePrefix=\\%s\\%s", kindStorage, nameStorage)
opts = append(opts, volumePrefix)
}

Expand Down

0 comments on commit 585e500

Please sign in to comment.