@@ -160,7 +160,8 @@ type Action struct {
160160}
161161
162162func (a Action ) DskIsSet () bool {
163- return a .Path != ""
163+ hfeExists , _ := a .hfeIsSet ()
164+ return a .Path != "" || hfeExists
164165}
165166
166167func (a * Action ) WithOptions (options Options ) * Action {
@@ -228,6 +229,7 @@ func (a *Action) SetDsk() (onError bool, message, hint string) {
228229}
229230
230231func (a * Action ) DoDskActions () (onError bool , message , hint string ) {
232+ var listAlreadyDone bool
231233 onError , message , hint = a .SetDsk ()
232234 if onError {
233235 return onError , message , hint
@@ -260,10 +262,13 @@ func (a *Action) DoDskActions() (onError bool, message, hint string) {
260262 onError , message , hint = GetAllFileDsk (action .Folder , a .desc , a .options )
261263 case ActionListDsk :
262264 onError , message , hint = ListDsk (a .d , a .Path )
265+ listAlreadyDone = true
263266 case ActionFileinfoDsk :
264267 onError , message , hint = FileinfoDsk (a .d , a .fd .Path )
265268 default :
266- onError , message , hint = ListDsk (a .d , a .Path )
269+ if ! listAlreadyDone {
270+ onError , message , hint = ListDsk (a .d , a .Path )
271+ }
267272 }
268273 if onError {
269274 return onError , message , hint
0 commit comments