refactoring

This commit is contained in:
chrislu
2022-08-22 14:11:13 -07:00
parent 7ea2c24c5d
commit 57e7582c36
2 changed files with 13 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ func (ce *CommandEnv) isDirectory(path string) bool {
func (ce *CommandEnv) confirmIsLocked(args []string) error {
if ce.locker.IsLocking() {
if ce.locker.IsLocked() {
return nil
}
ce.locker.SetMessage(fmt.Sprintf("%v", args))
@@ -82,6 +82,10 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error {
}
func (ce *CommandEnv) isLocked() bool {
return ce.locker.IsLocked()
}
func (ce *CommandEnv) checkDirectory(path string) error {
dir, name := util.FullPath(path).DirAndName()