Implement new fsm
This commit is contained in:
@@ -31,7 +31,7 @@ func HandleRenameFile(directory, torrentName, fileName, newName string, torMgr *
|
||||
return fmt.Errorf("cannot find torrent %s", torrentName)
|
||||
}
|
||||
file, ok := torrent.SelectedFiles.Get(fileName)
|
||||
if !ok || file.IsDeleted {
|
||||
if !ok || !file.State.Is("ok") {
|
||||
return fmt.Errorf("cannot find file %s", fileName)
|
||||
}
|
||||
oldName := torMgr.GetPath(file)
|
||||
|
||||
Reference in New Issue
Block a user